[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) { >   element.obser

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

2008-10-29 Thread Paul Kim
Thanks Robert On Tue, Oct 28, 2008 at 9:58 PM, 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(

[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 Z