"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(); }); }); http://docs.jquery.com On 13 апр, 11:55, Sasser <maik.tai...@googlemail.com> wrote: > hi > > i'm new to jquery and got a problem concerning the preloading of > content. > before changing the content dynamically i want to fade it out. so i > tried this: > > $("#div").fadeOut(); > $("#div").load(url); > $("#div").fadeIn(); > > this works quite good. there is just the problem that the content > fades in immediately after fading out - there is no time for the > loading of content. > > a guy in the irc-channel told me to use a callback function... but i > do not really understand :( > > can anyone help me? > thanks!