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-
- How to unbind “hover” event using JQuery?
- How to animate div width and height on mouse hover using jQuery ?
- How to use .on and .hover in jQuery ?
- How to add <li> class to active and leave it after hover using jQuery ?
- jQuery | jQuery.fx.interval Property with example
- jQuery | jQuery.fx.off Property
- jQuery | jQuery.support Property
- jQuery | jquery Property
- How to disable a CSS :hover effect?
- How to make Bootstrap popover appear/disappear on hover instead of click?
- How to expand button with animation on hover using Vue.js ?
- How to prevent sticky hover effects for buttons on touch devices ?
- jQuery | prepend() with Examples
- jQuery | dblclick() with Examples
- jQuery | offset() with Examples
- jQuery | children() with Examples
- jQuery | Hide/Show, Toggle and Fading methods with Examples
- jQuery | focusin() with Examples
- jQuery | Animation, Slide methods with Examples
- jQuery | change() with Examples
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.