1.

Explain Hover() Method In Jquery?

Answer»

The HOVER() method takes two FUNCTIONS and is a combination of the mouseenter() and mouseleave() methods. The first function is executed when the mouse enters the HTML element, and the second function is executed when the mouse leaves the HTML element:

Example:

$("#p1").hover(function(){ alert("You entered p1!"); }, function(){ alert("Bye! You now LEAVE p1!"); });

The hover() method takes two functions and is a combination of the mouseenter() and mouseleave() methods. The first function is executed when the mouse enters the HTML element, and the second function is executed when the mouse leaves the HTML element:

Example:

$("#p1").hover(function(){ alert("You entered p1!"); }, function(){ alert("Bye! You now leave p1!"); });



Discussion

No Comment Found