views:

83

answers:

2

hi geeks!!!

i'va simple code in mootools which shows hides a span tag..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');}});
A: 

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

.selector span {display: none;}
antpaw
i used it..but it never display the span even when slicked on show..think css overriding :(
jest
A: 
$$("span").setStyle("display", "none");

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

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