Hello,
Trying to solve that problem, but no luck for hours...
I have
var screen1 = $('#screen');
var screen2 = $('#screen_teams');
var screen3 = $('#field_position');
. . .
screenFade(screen1,1000,1);
function screenFade(screen,delay,next) {
if (next == 1) {
screen.delay(delay).fadeOut(1000, function() {animation(2);console.log('2');});
} else {
screen.fadeIn(1000).delay(delay).fadeOut(1000, function() {animation(next);console.log(next);});
}
}
function animation(seq) {
if (seq == 2) {
screenFade(screen2,2000,3);
};
if (seq == 3) {
screenFade(screen3,2000,4);
};
if (seq == 4) {
screenFade(screen4,2000,5);
};
}
And firebug outputs: 2 2 3 3 4 4 5 5
Do you know the solution? Thanks in advance!