Thanks to both of you! :) this is exactly what I needed. Question 2: is there a way to pause the slidedown from happening? I notice there's a pause() plugin, I dl'ed that and attempted to chain it such as:
target.slideUp("slow", function() { target.children("div.middle").html(stuff).pause(2000).slideDown("slow"); }); But alas, no pause happened. thanks, -kim --- Klaus Hartl <[EMAIL PROTECTED]> wrote: > Kim Johnson schrieb: > > I'm having a hard time getting functions to happen > in > > the order I want them to. Specifically, I need the > > html of a div to be rewritten BEFORE it slides > back > > down. I'm seeing the html change while the div is > > sliding up, which isn't what I'm looking for. Is > there > > any way to force functions to finish before moving > on? > > Synchronous-style... > > > > -a div on the page is assigned to divTarget, and > I'm > > positive it's finding the correct one) > > > > -stuff holds the results of an ajax query: some > basic > > HTML. > > > > $(divTarget).slideUp("slow"); > > $(divTarget).children("div.middle").html(stuff); > > $(divTarget).slideDown("slow"); > > > > *note: I know I could chain these, but am trying > to > > get it to work first before fiddling with that ;) > > > > thanks, > > -kim > > You have to use callbacks which are provided for all > of the animate > functions: > > var target = $(divTarget); > target.slideUp("slow", function() { > target.children("div.middle").html(stuff); > target.slideDown("slow"); > }); > > I've saved the target in a variable to avoid > creating a jQuery object 3 > times. > > > -- Klaus > > _______________________________________________ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > ____________________________________________________________________________________ Never Miss an Email Stay connected with Yahoo! Mail on your mobile. Get started! http://mobile.yahoo.com/services?promote=mail _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/