I’m trying to do a little javascript trick to fade out a div, replace its content, and fade it back in. The .html event is replacing the content before the fadeOut is complete…
$("#products").fadeOut(500)
.delay(600)
.html($("#productPage" + pageNum).html())
.fadeIn(500);
It appears that the .html() is not being delayed by the .delay() method.
delaywill work for your case when used with thequeuelike this:Try it here: http://jsfiddle.net/n7j8Y/