开发者

Animate hidden hyperlink to display:block

given a hidden hyperlink (hidden by setting display: inline in a css file), how can I achieve to animate this hyperlink to 'display:block'? Neither show() nor the following code

 .animate({
     display: block
 }, {
     开发者_高级运维duration: 500
 }

do work!

Anny suggestions? Cheers, cube


you are using animate with a wrong css property.

just go like

 $('a.link').fadeIn();

here you can find all the info you need to get started with jquery effects


The animate method needs something that has more than 2 states. Like another answer suggested, you can use the .fadeIn() / .fadeOut methods. The other choice is to animate the css opacity value.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜