mirror of
https://github.com/jquery/jquery.git
synced 2024-12-09 08:04:24 +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
This commit is contained in:
parent
6616acff0a
commit
fd6ffc5eb2
@ -24,7 +24,9 @@ jQuery.fn.extend( {
|
||||
},
|
||||
|
||||
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