[Proto-Scripty] Re: $$() and Element.observe() question

2008-10-29 Thread Robert Zotter
kimbaudi, Like you said, $$() returns and array of DOM elements. You just need to iterate over the collection and set up the observe event on each item. For example: $$('.class').each(function(element) { element.observe('click', function() { alert('clicked'); }); }); Cheers -- Robert

[Proto-Scripty] Re: $$() and Element.observe() question

2008-10-29 Thread ColinFine
On Oct 29, 4:58 am, Robert Zotter [EMAIL PROTECTED] wrote: kimbaudi, Like you said, $$() returns and array of DOM elements. You just need to iterate over the collection and set up the observe event on each item. For example: $$('.class').each(function(element) {