You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<desc>Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements.</desc>
7
7
<signature>
@@ -16,12 +16,15 @@
16
16
</argument>
17
17
</signature>
18
18
<longdesc>
19
+
<divclass="warning">
20
+
<p>This API is deprecated. Use <code>.on( "mouseenter", handlerIn ).on( "mouseleave", handlerOut )</code> instead.</p>
21
+
</div>
19
22
<p>The <code>.hover()</code> method binds handlers for both <code>mouseenter</code> and <code>mouseleave</code> events. You can use it to simply apply behavior to an element during the time the mouse is within the element.</p>
20
23
<p>Calling <code>$( selector ).hover( handlerIn, handlerOut )</code> is shorthand for:</p>
<p>See the discussions for <code><ahref="/mouseenter/">.mouseenter()</a></code> and <code><ahref="/mouseleave/">.mouseleave()</a></code> for more details.</p>
27
+
<p>See the discussions for <code><ahref="/mouseenter/">mouseenter</a></code> and <code><ahref="/mouseleave/">mouseleave</a></code> for more details.</p>
25
28
</longdesc>
26
29
<example>
27
30
<desc>To add a special style to list items that are being hovered over, try:</desc>
<p>This API is deprecated. Use <code>.on( "mouseenter mouseleave", handlerInOut )</code> instead.</p>
101
+
</div>
94
102
<p>The <code>.hover()</code> method, when passed a single function, will execute that handler for both <code>mouseenter</code> and <code>mouseleave</code> 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 <code>event.type</code>.</p>
95
103
<p>Calling <code>$(selector).hover(handlerInOut)</code> is shorthand for:</p>
<p>See the discussions for <code><ahref="/mouseenter/">.mouseenter()</a></code> and <code><ahref="/mouseleave/">.mouseleave()</a></code> for more details.</p>
107
+
<p>See the discussions for <code><ahref="/mouseenter/">mouseenter</a></code> and <code><ahref="/mouseleave/">mouseleave</a></code> for more details.</p>
100
108
</longdesc>
101
109
<example>
102
110
<desc>Slide the next sibling LI up or down on hover, and toggle a class.</desc>
0 commit comments