[jQuery] Re: preloading a div

2009-04-15 Thread Alan FSPP
or $("#div").ajaxStart(function(){ $(this).fadeIn("fast"); }); $("#div").ajaxStop(function(){ $(this).fadeOut("fast"); }); $("#div").load(url) fade is automatic 2009/4/14 Liam Potter > > a callback function is something that runs after an action has been > completed. This is what y

[jQuery] Re: preloading a div

2009-04-14 Thread Liam Potter
a callback function is something that runs after an action has been completed. This is what you need for what you are trying to achieve, I'm also going to chain the actions. $("#div").fadeOut(500, function() { $("#div").load(url).fadeIn(); }); The 500 is the time in miliseconds it t

[jQuery] Re: preloading a div

2009-04-13 Thread errant
"In computer programming, a callback is executable code that is passed as an argument to other code." - http://en.wikipedia.org/wiki/Callback_(computer_science) This will probably work for you: $("#div").fadeOut(function(){ $("#div").load(url, function() { $("#div").fadeIn(); }); }); h