diff --git a/wp-includes/js/hoverIntent.js b/wp-includes/js/hoverIntent.js index f4bcc1bf7c..130014872a 100644 --- a/wp-includes/js/hoverIntent.js +++ b/wp-includes/js/hoverIntent.js @@ -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 } ); diff --git a/wp-includes/js/hoverIntent.min.js b/wp-includes/js/hoverIntent.min.js index ddd8f29dc5..8b9b4baea3 100644 --- a/wp-includes/js/hoverIntent.min.js +++ b/wp-includes/js/hoverIntent.min.js @@ -1,2 +1,2 @@ /*! This file is auto-generated */ -!function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=e(require("jquery")):jQuery&&!jQuery.fn.hoverIntent&&e(jQuery)}(function(i){"use strict";var u,r,v={interval:100,sensitivity:6,timeout:0},d=0,a=function(e){u=e.pageX,r=e.pageY},p=function(e,t,n,o){if(Math.sqrt((n.pX-u)*(n.pX-u)+(n.pY-r)*(n.pY-r))