Hi all,

Bit of a newbie question this.

I usally add my events to elements like this using an anonymous function I 
think its called.

$$('.myClass').addEvent( 'blur', function(e){
console.log(e.target.id); <--- I have the event available here
}

I now have a need to attach and detach an event dynamically so I want to 
declare the function like so;

var myFunction(event){

}

then attach like;

$$('.myClass').addEvent( 'blur', myFunction(event))

But I dont know how to ensure that the element and event get bound to the 
function.

Thanks
Rolf

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mootools-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to