开发者

jquery: animate $('id1').before('some html') to fadeIn and from red to transparent

I want to make something just like on this site (when you/or somebody else adds an answer)

the answer appears and fades in and comes from orange to transparent, anybod开发者_如何学编程y knows how ?


You can get the color plugin and animate the background color of whatever element you want, like this:

$("#myDiv").animate({ backgroundColor: "white" }, 1000);

This will fade it from whatever color you set it to initially (or via .css() just before the animate) to the color you specify over 1 second. You can try the other color plugin demos here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜