How to attach more than 1 event handlers to elements in jQuery ?
With the help of event handlers, we can set the particular event available in jQuery on the HTML element. In jQuery, a number of events are available such as click(), mouseover(), dblclick(), etc. In this article, we are going to learn how we can attach more than one event handler to the elements. In jQuery, we can add one or more than one event handler on any element easily.
Example: In this example, we will add three different kinds of event handlers on a div and check all the events respectively. The very first event will be click(), when we click on the div, it will scale down, 2nd event will be dblclick(), when we double click on the div element, it will get bigger in scale, 3rd event will be mouseover, when we move our pointer to the div, it will change its color. So this is how are going to implement three different event handlers on a single div element.