Reputation: 47
I want to learn about the function(e)
, its functions, parameters and similar. Can you point me to some tutorials I can use
Upvotes: 0
Views: 3417
Reputation: 14464
You should be more precise. It is mostly used as event object, but what it contains is strictly connected with event type. Take a look here: http://api.jquery.com/category/events/event-object/
Upvotes: 3
Reputation: 943517
It is an anonymous function that takes one named argument: e. (And, like any JS function, any number of unnamed arguments available through the arguments
array.
It does whatever it is written to do.
In most cases, e
suggests that it will be used as an event handler, so e
will be an event object.
Upvotes: 1
Reputation: 630389
To any event handler in jQuery, the first argument is the event object, normally called e
or event
, you can read more about it here: http://api.jquery.com/category/events/event-object/
The most common uses are using it for stop bubbling (e.stopPropagation()
), stopping the default event (e.preventDefault()
), or getting/using the target (e.target
)
, but there are lots of other uses as well.
Upvotes: 1