Animate function jQuery
- by Antonio Pitasi
I'm new here and I have a problem the jQuery's function "animate"
function myFunction(newpage) {
$('#loader').animate({opacity: 0.0}, 400, 'linear', function(){
// callback of fadeOut()
$(this).load(newpage + ".php #toload", function(){
// callback of load()
$('#loader').animate({opacity: 100.0}, 400, 'linear', function(){
//callback of fadeIn()
// (not relevant for my problem, I think)
$.getScript("js/test.js");
});
});
});
}
My problem is: the first "animate" works like a charm but the second load the new content correctly, without the animation (a simple fadeIn).
Anyone can help me?
Thanks in advice!
P.S. Sorry for my english