document.observe('click', function(e) {
if (e.findElement('.test')) {
console.log('clicked');
}
});
.live() lets you attach to all items of a given CSS class. Prototype lets you do it too. Handy.
Thanks Chris
document.observe('click', function(e) {
if (e.findElement('.test')) {
console.log('clicked');
}
});
.live() lets you attach to all items of a given CSS class. Prototype lets you do it too. Handy.
Thanks Chris