jQuery bind Event





jQuery bind() Event

jQuery .bind() event used to attach or bind the handler to a specific event on the HTML elements.

Syntax

The jQuery .bind() method is responsible for attaching an event handler directly to elements. Basically, Handlers are attached to the currently selected elements in the jQuery object, so those elements must exist when call we .bind() event method.

Example

In the above example, if you do a single click on the HTML element span tag which contains the text, it will bind that event and display back by resulting you clicked once. And if you do double click, it will bind that event and result back by saying you clicked twice.

The above jQuery bind() event example produces the following result

Output
jQuery bind() event method
Try It Now

Other Advanced jQuery Events you might want to learn



jQuery Complete Events Reference

jQuery Events

jQuery Document Events

jQuery Keyboard Events

jQuery Mouse Events