I want to learn about the function(e), its functions, parameters and similar. Can you point me to some tutorials I can use
views:
50answers:
3To 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.
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.
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/