code:

        $("#body").animate({height: 'hide'}, 'fast');   //hide the body,
untill get returns...
        $.get(thehtml, {sid: Math.random()}, function(thepage){
                $("#body")
                .html(thepage)                                  //apply new 
content...
                .animate({height: 'show'}, 'slow');             //show the 
body...
        });

--

With this code I wanted to hide the div with .animate, then wait
untill, the get message returns, then when it does load the return
value into the div, and then show it with .animate.

The problem is it returns before the hide animate finishes and shows
the new contents while still hiding.

I want it to show the old content untill it finishes hiding, then when
it finishes hiding, I want it to replace the content with the return
of the php file, and then do show.

Could someone help make this happen. I've never done animations in
javascript so I wouldn't know how to piece together the code.

Reply via email to