mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Deprecated: Define .hover()
using non-deprecated methods
Make the deprecated `.hover()` method not rely on other deprecated
methods: `.mouseenter()` & `.mouseleave()`. Use `.on()` instead.
Closes gh-5251
(cherry picked from commit fd6ffc5eb2
)
This commit is contained in:
parent
b473729d0e
commit
7287894f1a
@ -28,7 +28,9 @@ jQuery.fn.extend( {
|
|||||||
},
|
},
|
||||||
|
|
||||||
hover: function( fnOver, fnOut ) {
|
hover: function( fnOver, fnOut ) {
|
||||||
return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
|
return this
|
||||||
|
.on( "mouseenter", fnOver )
|
||||||
|
.on( "mouseleave", fnOut || fnOver );
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user