tags:

views:

50

answers:

3

I want to learn about the function(e), its functions, parameters and similar. Can you point me to some tutorials I can use

A: 

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.

Nick Craver
A: 

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.

David Dorward
Are you trying to say that, I can give something like `$("p").click(fucntion(param1,param2) { ............... });`
That isn't what I was saying, although you could, but the second argument will never be offered a value.
David Dorward
+2  A: 

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/

Thinker