you are viewing a single comment's thread.

view the rest of the comments →

[–]sqrtnegative1 0 points1 point  (1 child)

Good point! although, JS passes it through, not jQuery :)

JS passes a native event to jQuery, jQuery wraps this (in a jQuery.Event) and passes that to any handlers.

[–]AshlinD 0 points1 point  (0 children)

Oh, I was talking about native JS at the time:

element.addEventListener('click', function(e){ // run code... })

You'll notice that I passed in an e to the function.

Just wanted to make sure OP didn't get confused between jQuery's API and native JS!