91-9990449935 0120-4256464 |
jQuery hover()The jQuery hover() method executes two functions when you roam the mouse pointer over the selected element. The hover() method triggers both the mouseenter and mouseleave events. Syntax: Note: If you specify only one function then it will be run for both the mouseenter and mouseleave event.Parameters of jQuery hover() event
jQuery hover() exampleLet's take an example to see the hover () effect. In this example, when you hover your mouse pointer over the selected element the the background color of that selected element will be changed. Test it NowOutput: Hover your mouse pointer on me! Note: In the above example, the background color of the selected element is violet for mouseenter event and green for mouseleave event.jQuery hover() example 2Let's see another example of hover() event with the combination of fadeIn and fadeOut effects. Test it Now
Next TopicjQuery mousedown()
|