jQuery hover() Method (original) (raw)
Last Updated : 11 Jul, 2025
The **jQuery **hover() is an inbuilt method that is used to specify two functions to start when the mouse pointer moves over the selected element.
**Syntax:
$(selector).hover(Function_in, Function_out);
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.
**Example 1: jQuery code to show the working of the hover() method.
HTML `
GeeksforGeeks !
`
**Output:

**Example 2: In this example, we will change the font size by hovering the mouse in and out.
HTML `
GeeksforGeeks !
`
**Output: