wp/wp-includes/js/hoverIntent.js
changeset 19 3d72ae0968f4
parent 18 be944660c56a
--- a/wp/wp-includes/js/hoverIntent.js	Wed Sep 21 18:19:35 2022 +0200
+++ b/wp/wp-includes/js/hoverIntent.js	Tue Sep 27 16:37:53 2022 +0200
@@ -1,5 +1,5 @@
 /*!
- * hoverIntent v1.10.1 // 2019.10.05 // jQuery v1.7.0+
+ * hoverIntent v1.10.2 // 2020.04.28 // jQuery v1.7.0+
  * http://briancherne.github.io/jquery-hoverIntent/
  *
  * You may use hoverIntent under the terms of the MIT license. Basically that
@@ -92,6 +92,11 @@
         return out.apply($el[0],[ev]);
     };
 
+    // checks if `value` is a function
+    var isFunction = function(value) {
+        return typeof value === 'function';
+    };
+
     $.fn.hoverIntent = function(handlerIn,handlerOut,selector) {
         // instance ID, used as a key to store and retrieve state information on an element
         var instanceId = INSTANCE_COUNT++;
@@ -100,10 +105,10 @@
         var cfg = $.extend({}, _cfg);
         if ( $.isPlainObject(handlerIn) ) {
             cfg = $.extend(cfg, handlerIn);
-            if ( !$.isFunction(cfg.out) ) {
+            if ( !isFunction(cfg.out) ) {
                 cfg.out = cfg.over;
             }
-        } else if ( $.isFunction(handlerOut) ) {
+        } else if ( isFunction(handlerOut) ) {
             cfg = $.extend(cfg, { over: handlerIn, out: handlerOut, selector: selector } );
         } else {
             cfg = $.extend(cfg, { over: handlerIn, out: handlerIn, selector: handlerOut } );