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;}
精彩评论