WordPress/wp-includes/js/hoverIntent.min.js
desrosj efaa79d347 External Libraries: Update jQuery hoverIntent to version 1.10.1.
This updates the `jquery-hoverintent` dependency from 1.8.3 to 1.10.1.

For a full list of changes, see https://github.com/briancherne/jquery-hoverIntent/compare/v1.8.3...v1.10.1.

Fixes #52686.
Built from https://develop.svn.wordpress.org/trunk@50521


git-svn-id: http://core.svn.wordpress.org/trunk@50134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-10 15:25:20 +00:00

2 lines
1.4 KiB
JavaScript

/*! 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";function d(e){u=e.pageX,r=e.pageY}var u,r,v={interval:100,sensitivity:6,timeout:0},a=0,p=function(e,t,n,o){if(Math.sqrt((n.pX-u)*(n.pX-u)+(n.pY-r)*(n.pY-r))<o.sensitivity)return t.off(n.event,d),delete n.timeoutId,n.isActive=!0,e.pageX=u,e.pageY=r,delete n.pX,delete n.pY,o.over.apply(t[0],[e]);n.pX=u,n.pY=r,n.timeoutId=setTimeout(function(){p(e,t,n,o)},o.interval)};i.fn.hoverIntent=function(e,t,n){var o=a++,s=i.extend({},v);i.isPlainObject(e)?(s=i.extend(s,e),i.isFunction(s.out)||(s.out=s.over)):s=i.isFunction(t)?i.extend(s,{over:e,out:t,selector:n}):i.extend(s,{over:e,out:e,selector:t});t=function(e){var u=i.extend({},e),r=i(this),t=r.data("hoverIntent");t||r.data("hoverIntent",t={});var v=t[o];v||(t[o]=v={id:o}),v.timeoutId&&(v.timeoutId=clearTimeout(v.timeoutId));t=v.event="mousemove.hoverIntent.hoverIntent"+o;"mouseenter"===e.type?v.isActive||(v.pX=u.pageX,v.pY=u.pageY,r.off(t,d).on(t,d),v.timeoutId=setTimeout(function(){p(u,r,v,s)},s.interval)):v.isActive&&(r.off(t,d),v.timeoutId=setTimeout(function(){var e,t,n,o,i;e=u,t=r,n=v,o=s.out,(i=t.data("hoverIntent"))&&delete i[n.id],o.apply(t[0],[e])},s.timeout))};return this.on({"mouseenter.hoverIntent":t,"mouseleave.hoverIntent":t},s.selector)}});