From 91c8ed5a0f6de934cf85a24b1824e905c4f94b98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Bl=C3=A4ul?= Date: Tue, 17 Mar 2026 22:54:27 +0100 Subject: [PATCH] jQuery.isFunction is removed in jQuery 4.0+ --- dist/js/hoverIntent.js | 4 ++-- src/js/hoverIntent.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/js/hoverIntent.js b/dist/js/hoverIntent.js index cbe3ae7..0d3d108 100644 --- a/dist/js/hoverIntent.js +++ b/dist/js/hoverIntent.js @@ -40,7 +40,7 @@ if ( typeof handlerIn === "object" ) { cfg = $.extend(cfg, handlerIn ); - } else if ($.isFunction(handlerOut)) { + } else if ( typeof handlerOut === "function" ) { cfg = $.extend(cfg, { over: handlerIn, out: handlerOut, selector: selector } ); } else { cfg = $.extend(cfg, { over: handlerIn, out: handlerIn, selector: handlerOut } ); @@ -111,4 +111,4 @@ // listen for mouseenter and mouseleave return this.on({'mouseenter.hoverIntent':handleHover,'mouseleave.hoverIntent':handleHover}, cfg.selector); }; -})(jQuery); \ No newline at end of file +})(jQuery); diff --git a/src/js/hoverIntent.js b/src/js/hoverIntent.js index cbe3ae7..0d3d108 100644 --- a/src/js/hoverIntent.js +++ b/src/js/hoverIntent.js @@ -40,7 +40,7 @@ if ( typeof handlerIn === "object" ) { cfg = $.extend(cfg, handlerIn ); - } else if ($.isFunction(handlerOut)) { + } else if ( typeof handlerOut === "function" ) { cfg = $.extend(cfg, { over: handlerIn, out: handlerOut, selector: selector } ); } else { cfg = $.extend(cfg, { over: handlerIn, out: handlerIn, selector: handlerOut } ); @@ -111,4 +111,4 @@ // listen for mouseenter and mouseleave return this.on({'mouseenter.hoverIntent':handleHover,'mouseleave.hoverIntent':handleHover}, cfg.selector); }; -})(jQuery); \ No newline at end of file +})(jQuery);