jQuery events functions are huge and can get triggered by any type of mouse movement or clicks, keyboard activities, hover, focus etc.
These are the various jQuery event methods provided by the API:
- .click(): This method fires on a mouse click.
- .dblclick(): This method fires on a mouse double-click.
- .mousedown(): This method fires when mouse button is pressed.
- .mouseenter(): This method fires when the mouse enters the html element area.
- .mouseleave(): This method fires when the mouse leaves the html element area.
- .mousemove(): This method fires when the mouse is moved.
- .mouseout(): This method fires when the mouse moves out of the html element.
- .mouseover(): This method fires when the mouse moves over the html element.
- .mouseup(): This method fires when the mouse button is released
- .hover(): This method fires when the mouse enters and leaves the html elements.
- .keydown(): This method fires when a key is pressed
- .keypress(): This method fires when a key is pressed and released.
- .keyup(): This method fires when a key is released.
- .blur(): This method fires when the html element loses focus.
- .change(): This method fires on change.
- .focus(): This method fires when an element gets focus.
- .load(): This method fires when a document is loaded
- .unload(): This method fires when documents are unloaded
- .error(): This method fires when there is an error.
- .resize(): This method fires when the window is resized.
- . scroll (): This method fires when the window is scrolled.
- . select (): This method fires when a text is selected.
- .submit(): This method fires when a form is submitted.
The general syntax for using jQuery event method is selector.jQueryEventMethod(). jQueryEventMethod could be any above mentioned methods. You can use these methods in your code to effectively interact with the browser. We will look into these jQuery events with examples in coming posts.