最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - fade outfade in and roll up jquery effect - Stack Overflow

programmeradmin1浏览0评论

i have a list of items like so:

<ul>
<li><div>some super awesome html here</div></li>
<li><div>another awesome item here</div></li>

....

I'm looking for a nice effect to pop/remove the last item on the list and add/fade in a new item on the top after an ajax call. anyone suggestions would be great. thanks.

EDIT: something more advanced than just simple fade in/out. i've seen it somewhere on the sites where there is a list of 5 items or so and a new item added to the list and old removed with a cool effect.

i have a list of items like so:

<ul>
<li><div>some super awesome html here</div></li>
<li><div>another awesome item here</div></li>

....

I'm looking for a nice effect to pop/remove the last item on the list and add/fade in a new item on the top after an ajax call. anyone suggestions would be great. thanks.

EDIT: something more advanced than just simple fade in/out. i've seen it somewhere on the sites where there is a list of 5 items or so and a new item added to the list and old removed with a cool effect.

Share Improve this question asked Jun 21, 2011 at 17:02 ShaneKmShaneKm 21.4k46 gold badges176 silver badges307 bronze badges 1
  • I just noticed your edit and updated my post. – jncraton Commented Jul 8, 2011 at 12:15
Add a ment  | 

1 Answer 1

Reset to default 6

jQuery fadeOut()/fadeIn() should do the trick:

http://api.jquery./fadeOut/

http://api.jquery./fadeIn/

EDIT:

If you want something fancier, slideUp()/slideDown() provide basic sliding animations:

http://api.jquery./slideUp/

http://api.jquery./slideDown/

There also animate() if you want to add your own animations via changing CSS properties.

http://api.jquery./animate/

发布评论

评论列表(0)

  1. 暂无评论