/ Published in: JavaScript

based on [http://net.tutsplus.com/tutorials/javascript-ajax/create-a-simple-powerful-product-highlighter-with-mootools/](http://net.tutsplus.com/tutorials/javascript-ajax/create-a-simple-powerful-product-highlighter-with-mootools/)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var bubbles = $$("div.bubble"); var pages = $$("div.page"); $("bubbleWrap").setStyle("visibility", "visible"); bubbles.setStyle("opacity", 0); pages.each(function(el, i) { el.set("morph", { link: "cancel" }); el.addEvents({ mouseenter: function() { bubbles[i].morph({ opacity: 1, marginTop: "-15px" }); }, mouseleave: function() { bubbles[i].morph({ opacity: 0, marginTop: 0 }); } }); });
URL: http://jsfiddle.net/qz8Ad/
Comments
