Содержание:
.hover( handlerIn, handlerOut )Возвращает: jQuery
Описание: Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements.
-
Добавлен в версии: 1.0.hover( handlerIn, handlerOut )
-
handlerInA function to execute when the mouse pointer enters the element.
-
handlerOutA function to execute when the mouse pointer leaves the element.
-
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.
Calling $( selector ).hover( handlerIn, handlerOut )
is shorthand for:
1
|
|
See the discussions for .mouseenter()
and .mouseleave()
for more details.
.hover( handlerInOut )Возвращает: jQuery
Описание: Bind a single handler to the matched elements, to be executed when the mouse pointer enters or leaves the elements.
-
Добавлен в версии: 1.4.hover( handlerInOut )
-
handlerInOutA function to execute when the mouse pointer enters or leaves the element.
-
The .hover()
method, when passed a single function, will execute that handler for both mouseenter
and mouseleave
events. This allows the user to use jQuery's various toggle methods within the handler or to respond differently within the handler depending on the event.type
.
Calling $(selector).hover(handlerInOut)
is shorthand for:
1
|
|
See the discussions for .mouseenter()
and .mouseleave()
for more details.