Описание тега jquery-hover
The .hover() method binds handlers for both mouseenter and mouseleave events.
The .hover()
method binds handlers for both mouseenter
and mouseleave
events. You can use it to simply apply behavior to an element during the time the mouse is within the element.
$(selector).hover( handlerIn, handlerOut )
Note that Calling above code is shorthand for:
$( selector ).mouseenter( handlerIn ).mouseleave( handlerOut );
Example:
// hover
$("li").hover(function() {
$(this).append("<span>***</span>");
// unhover
}, function() {
$(this).find("span:last").remove();
});
Reference: http://api.jquery.com/hover/