The hover() is an inbuilt method in jQuery which is used to specify two functions to start when mouse pointer move over the selected element.
Here selector is the selected element.
Parameter: It accepts two parameters which are specified below-
- Function_in: It specifies the function to run when the mouse-enter event occurs.
- Function_out: It is optional and specifies the function to run when the mouse-leave event occurs.
Return Value: It returns the background color effect with the selected element.
Before mouse pointer is moved over the paragraph-
After mouse pointer is moved over the paragraph-
After mouse pointer is moved out from the paragraph-