I have set up my site to use the gitter popup system. The javascript look like this:
$(document).ready(function(){
setTimeout(function() {
$.gritter.add({
title: 'Welcome!',
text: 'This appears to be your first time playing. Blablabla',
time: '25000'
});
}, 500);
setTimeout(function() {
$.gritter.add({
title: 'Walkthrough',
text: 'A walkthrough was setup ...',
time: ''
});
}, 30000);
setTimeout(function() {
$.gritter.add({
title: 'You got mail',
text: 'You have received a message from x ',
time: ''
});
}, 36000);
This is an example of 3 popups. what I want to do is have arrays like this:
$popup_title[0] = "Welcome!";
$popup_text[0] = "This appears to be ...");
$popup_time[0] = 25000;
$popup_title[1] = "Walkthrough";
$popup_text[1] = "A basic blabla ...");
$popup_time[1] = "";
And loop through this arrays (if they aren't not empty) and construct the javascript based on the arrays.