Implement Custom Code in JQuery Events
A JQuery event is essentially an HTML DOM event.
Examples of an HTML DOM event include:
- moving a mouse over an element
- selecting a radio button
- clicking on an element
Here is a list of some common DOM events:
- Mouse Events
- Keyboard Events
- Form Events
- Document/Window Events
You can implement your own code logic in a JQuery event on particular HTML DOM element(s) so that when a JQuery event has fired, your custom code will be executed. Below is an example:
<p>If you double-click on me, I will alert you.</p>
In above example, when you double-click on any paragraph element identified by HTML tag <p>, the alert function (which is your custom code logic) will be called.