Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jquery documentation [closed]

I want to know what is 'e' (s. following source code) and what member it has. Where do I find a documentation for this kind of stuff? I would like to have "one" documentation for the whole jQuery-API and all parameters. Searching in Google is too time-consuming...

$("#idxy").mousedown(function(e) { ... });

Do you have any recommendations?

like image 509
user1027167 Avatar asked Dec 17 '22 07:12

user1027167


2 Answers

Check out the official jQuery documentation.

In this case, e refers to the Event object, which is passed to all event handlers by jQuery. This differs to a standard Event object in that jQuery normalizes many properties for cross-browser consistency.

One extremely handy tip is that you can type http://api.jquery.com/methodName and you'll get shown the documentation for that method; try it out;

  • http://api.jquery.com/mousedown for the mousedown() function
  • http://api.jquery.com/attr for the attr() function
  • http://api.jquery.com/length for the length member

... you get the idea ;).

like image 122
Matt Avatar answered Jan 02 '23 18:01

Matt


e is an event object that gets passed to the function with details of the event that caused it.

The properties will be different depending on what raised the event in the first place, see the JQuery documentation for more details:

http://api.jquery.com/category/events/event-object/

like image 27
shawty Avatar answered Jan 02 '23 17:01

shawty