What are jQuery Event Helper Methods?

jQueryWeb DevelopmentFront End Technology

jQuery also provides a set of event helper method which can be used either to trigger an event to bind any event types mentioned above.

Trigger Methods

The following is an example which would triggers the blur event on all paragraphs −

$("p").blur();

Binding Methods

The following is an example which would bind a click event on all the <div> −

$("div").click( function () {
   // do something here
});

Here are some of the jQuery Event Helper methods:

S. No
Method & Description
1.
blur()
Triggers the blur event of each matched element.
2.
blur( fn )
Bind a function to the blur event of each matched element.
3.
click( )
Triggers the click event of each matched element.
4
click( fn )
Binds a function to the click event of each matched element
5
dblclick( )
Triggers the dblclick event of each matched element.
6.
focus( fn )
Binds a function to the focus event of each matched element.


raja
Published on 20-Dec-2017 13:25:19
Advertisements