I'd like to have a DIV fade in after fading another out. Because the one DIV is inside of the other, I need the parent DIV to fade out completely (clearing any other content that might be showing) before the child DIV then fades in. I tried using the jQuery callback function in my code below to no avail.
$('#viewer a').click(function(e) {
e.preventDefault();
$('#content > *').fadeOut(500, function(){
$('#kiosk').fadeIn(250);
});
});
The DIVs are jumpy, and it's obvious that the script is not waiting for the animation to complete before beginning the fading in of the other DIV. Why is this?
Nota bene: I know I could probably chain a .delay() or something of the sort, but I'd rather not tack on half of a second when the callback function is there for this exact purpose!