开发者

hiding a span in mootools

i'va simple code in mootools which shows hides a span t开发者_C百科ag..but by default, it sows the text which i want to be shown only upon clicking a show button.. can anyone tell me how to hide a span tag in mootools?

Element.implement({
fancyShow: function(){this.fade('in');},fancyHide: function() {this.fade('out');}});


$$("span").setStyle("display", "none");

or if you want to have it work with the style consistent with fade, which tweens opacity:

$$("span").setOpacity(0);


I'm not a mootools user but I'm pretty sure it should be done with css

.selector span {display: none;}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜