I figured it out. I was just looking in the wrong spot. This worked for me.
$$('.oddRow').invoke('observe', 'mouseover', function(){ alert('test'); }); From: prototype-scriptaculous@googlegroups.com [mailto:prototype-scriptacul...@googlegroups.com] On Behalf Of Russell Keith Sent: Monday, August 17, 2009 11:48 AM To: prototype-scriptaculous@googlegroups.com Subject: [Proto-Scripty] observe by class name I am building a css table using div elements. I am trying to observe all the DIVs with a class name of oddRow but I keep getting JS errors. This is my first attempt at observing an entire class. Can someone please point me in the right direction. I thought the $$ method returned an array so I would need to iterate through with .each but I seem to running up against a brick wall. Any help would be greatly appreciated. document.observe('dom:loaded', function(){ $$('.oddRow').each.observe('click', function(){ alert('test'); }); }); --~--~---------~--~----~------------~-------~--~----~ 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-scriptaculous@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 -~----------~----~----~----~------~----~------~--~---