[thelist] unobtrusive JS: adding events with parameters?

Sarat Pediredla sarat.pediredla at gmail.com
Thu Jan 12 09:28:07 CST 2006

> I'm using Scott Andrew's faithful addEvent() method[1] to add an event to some images at load time. My init function has this clause:

Something like this will allow you to use anonymous functions
addEvent( obj, 'mouseover', function(){
kButtonBool(document.getElementById("itemid")); } );

An even better idea would be to use this version at


Sarat Pediredla
Blog: http://sarat.xcelens.co.uk "Talking a lot about nothing"

More information about the thelist mailing list