Skip to Main Content
MooTools 1.3 Cookbook
book

MooTools 1.3 Cookbook

by Jay L Johnston
July 2011
Intermediate to advanced content levelIntermediate to advanced
276 pages
5h 11m
English
Packt Publishing
Content preview from MooTools 1.3 Cookbook

Using MooTools Fx in conjunction with onmouseover events

Mouseover actions are great and when combined with smooth effects, most users cannot distinguish them from flash objects.

Getting ready

The previous two recipes have prepared us to add effects to our mouseover, button-shows-image creation. After reviewing those two concepts of attaching the event listeners and altering unrelated DOM elements, we are ready to make the images appear in a milky smooth, moo-fashion.

How to do it...

Rather than making the images suddenly show up, we instantiate a moo-effect upon the DIV pic. Using that effect object, we fade in and out the opacity of the DIV as the images are added and removed.

$$('a').addEvents({ 'mouseover':function() { // if the pic is visible, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Jump Start Web Performance

Jump Start Web Performance

Craig Buckler

Publisher Resources

ISBN: 9781849515689Other