Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MooTools: Fade out element?

I have an Element object that I'm currently calling .hide() on. Instead, I'd like to fade out the opacity of the entire Element (and its children) to 100% (hidden) as a transition effect over maybe 500 ms or 1000 ms.

Can Fx.Tween be used for this? Is this possible--does the MooTools framework have an effect like this in its UI library?

like image 450
JamesBrownIsDead Avatar asked Dec 11 '25 04:12

JamesBrownIsDead


1 Answers

 $('myElement').fade(0.7);

sets the element opacity to 70%. Or

$('myElement').fade('out'); // fades the element out.

http://mootools.net/docs/core/Fx/Fx.Tween#Element:fade

Element Method: fade
Element shortcut method for tween with opacity. Useful for fading an Element in and out or to a certain opacity level.

like image 146
JCasso Avatar answered Dec 13 '25 04:12

JCasso



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!