From fd6ffc5eb2c12562f2656d2f33865448420252be Mon Sep 17 00:00:00 2001 From: Michał Gołębiowski-Owczarek Date: Mon, 22 May 2023 18:23:19 +0200 Subject: 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 --- src/deprecated/event.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/deprecated/event.js b/src/deprecated/event.js index 84ff5bad0..4f5c59c0a 100644 --- a/src/deprecated/event.js +++ b/src/deprecated/event.js @@ -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 ); } } ); -- cgit v1.2.3