views:

624

answers:

3

Hi,

Can anyone recommend how to go about creating the "ease down" effect facebook implements today when you AJAX-load updates in your news feed? (When it reads "load x new news feed articles") if I use prepend, the new updates will be inserted all at once.

I'm looking for a way to ease/slide down the old updates smoothly in order to make room for the new, incoming updates.

Thanks.

+2  A: 

When you insert all of your elements, make sure they have display: none then use:

$("some jquery selector").show("slow")

See the jquery documentation page

Matt Bridges
A: 

How about the slideDown() and slideUp() methods?

Note that these can be used to "ease in" the new incoming updates, which will cause the old ones to ease downward.

Peter
A: 

show() will make the object expand both downward and to the right.

slideDown() will make the object expand downwards only.

If you want to achieve any other effects, use animate().

Chris B