I'm attempting to slide out a div
, then fade in content using a .load
request once the animation is complete.
I'm puzzled as to why this isn't working, but it seems to halt the animation and loading process entirely:
$('.films').click(function(){
$('.content-home').animate({left: "+=150%"}, "slow", function(){
$( ".wrapper" ).load( "films.php", function(){
$(this).fadeIn();
});
});
});
On the other hand, when I go back to this code, the content loads without any animation or fading effect taking place:
$('.films').click(function(){
$('.content-home').animate({left: "+=150%"}, "slow");
$( ".wrapper" ).load( "films.php");
});
Does anyone have an idea why the first example isn't behaving as expected?