function(el,ev) what does it mean?

mess picture mess · Jul 26, 2013 · Viewed 11.2k times · Source

when i have something like this

".mylabel click": function (el,ev){
//mycode in here 
}

what does el mean? what does ev mean?

I have tried searching it in canjs, but there isn't enough information.

Answer

Ralph Caraveo picture Ralph Caraveo · Jul 26, 2013

Typically, el would be the element that received the click event. ev is the actual click event itself which would tell you if the user clicked with the right mouse button or left mouse button...etc.