How to run a code on hover event in jQuery ?
In this article, we will see how to change the style of elements on hover event using jQuery. To change the style of hover event, hover() method is used. The hover() method is used to specify two functions to start when the mouse pointer moves over the selected element.
Parameter: It accepts two parameters which are specified below-
- Function_in: It specifies the function to run when the mouse move event occurs.
- Function_out: It is optional and specifies the function to run when the mouse move out event occurs.
Here, we have created a paragraph element and when mouse move over the paragraph element, the style of element will change.
Example: In this example, we are using the above-explained method.
My Personal Notes arrow_drop_up
Please Login to comment...