When using $$ in Prototype, the result is an array. You need to loop through the array to attach the observe function. Expl.
$$(’.myitems‘).each(function(item) { item.observe(’click’,function(){alert (’clicked’)});});
or
$$(’.myitems’).invoke(’observe’, ‘click’, function() {alert(’clicked’)});
Related posts: