View Full Version : Resolved prependTo,fadeIn, and slideDown

10-24-2010, 07:21 AM
I am attempting to prepend a div to another div. I want the div's elements to slide down, and then have the newly prepended element faded in. Here's what I have, but it's not working.



10-24-2010, 02:54 PM
In what way is it not working?

The slideDown() function will make the new element appear - so the subsequent fadeIn() will have no effect - is that the problem?

10-24-2010, 03:39 PM
Yes. The new element isn't fading in, which is what I'm trying to do. I don't want slidedown to automatically show the new element.

10-24-2010, 03:45 PM
That's what slideDown does, unfortunately. Is there any reason not to just use fadeIn and remove the slideDown entirely?

10-24-2010, 04:05 PM
I would like to keep both (even if I have to hack it to work correctly). I like the animation of the current contents sliding down to make room for the new element, and then the new element fading into view.

10-24-2010, 04:12 PM
Have a try with:


Setting the opacity to 0 before the slideDown allows the element then to be faded in with animate.

10-24-2010, 04:16 PM
That works! Thank you so much!!