I’m new here and I have a problem with 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 “animate” loads the new content correctly, without the animation (a simple “fadeIn”).
Anyone can help me?
Thanks in advice!
P.S. Sorry for my english
Animation is working but it is so fast that you can’t see it because you have specified
opacity:100;in 400 milliseconduse
{opacity: 1;}because opacity maximum value is 1 and min. value is 0