jQuery: what does the (e) in function (e) stand for?
jquery
Solution
`e` is an `event object`, it contains event data. Refer to jQuery Event Type, where you can find description of attributes and methods:
Attributes:
- event.type
- event.target
- event.data
- event.relatedTarget
- event.currentTarget
- event.pageX/Y
- event.result
- event.timeStamp
Methods:
- event.preventDefault()
- event.isDefaultPrevented()
- event.stopPropagation()
- event.isPropagationStopped()
- event.stopImmediatePropagation()
- event.isImmediatePropagationStopped()
Problem
Possible Duplicate: In Javascript/jQuery what does (e) mean? I'm new to programming. What exactly is the "e" in function(e) in the code below? I'm guessing it's whatever the recipient of the method is, and what "this" refers to? Just a wild guess. But even so, wouldn't we be able to leave function(e) as function() without the "e"? ``` $("#" + id).live("mouseenter", function (e) { $(this).toggleClass("twittereyesopen"); }); ```