Hi everybody! I'm actually working on a script acting on a UL menu with different LI classname. The goal is to react onMouseOver and onClick on each LI click or mouseover differently. The fact is the class is unknown so my script have to check the UL and then observe each LI as elements.
Here is the html: <ul id="menu"> <li class="item"><a id="current" href="">First</a> <li class="item23"><a id="current" href="">Second</a> <li class="item22"><a id="current" href="">Third</a> <li class="item12"><a id="current" href="">Vador</a> <li class="item6"><a id="current" href="">What the!</a> <li class="item2"><a id="current" href="">Hahum!</a> </ul> and then the script: function bindage() { $('menu').down('li').each(function (el) { return $(el).observe('click', function(event) { event.stop(); alert('hellow bro'); }); }); } Event.observe(window, 'load', bindage); But that obviously doesn't work... I really don't have any idea to make it work... I've tried so far but without any success... maybe you could help me? Thanks, JF. -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptacul...@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.