mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-09 04:11:10 +01:00
cfcff52de3
This updates the `jquery-hoverintent` dependency from 1.10.1 to 1.10.2, which fixes the deprecation of `jQuery.isFunction`. For a full list of changes, see https://github.com/briancherne/jquery-hoverIntent/compare/v1.10.1...v1.10.2. Follow-up to [50521]. Props titsmaker. Fixes #54722. See #51812. Built from https://develop.svn.wordpress.org/trunk@52429 git-svn-id: http://core.svn.wordpress.org/trunk@52021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2 lines
1.5 KiB
JavaScript
2 lines
1.5 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 u(e){return"function"==typeof e}var r,v,a={interval:100,sensitivity:6,timeout:0},f=0,s=function(e){r=e.pageX,v=e.pageY},p=function(e,t,n,o){if(Math.sqrt((n.pX-r)*(n.pX-r)+(n.pY-v)*(n.pY-v))<o.sensitivity)return t.off(n.event,s),delete n.timeoutId,n.isActive=!0,e.pageX=r,e.pageY=v,delete n.pX,delete n.pY,o.over.apply(t[0],[e]);n.pX=r,n.pY=v,n.timeoutId=setTimeout(function(){p(e,t,n,o)},o.interval)};i.fn.hoverIntent=function(e,t,n){var o=f++,d=i.extend({},a);i.isPlainObject(e)?(d=i.extend(d,e),u(d.out)||(d.out=d.over)):d=u(t)?i.extend(d,{over:e,out:t,selector:n}):i.extend(d,{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,s).on(t,s),v.timeoutId=setTimeout(function(){p(u,r,v,d)},d.interval)):v.isActive&&(r.off(t,s),v.timeoutId=setTimeout(function(){var e,t,n,o,i;e=u,t=r,n=v,o=d.out,(i=t.data("hoverIntent"))&&delete i[n.id],o.apply(t[0],[e])},d.timeout))};return this.on({"mouseenter.hoverIntent":t,"mouseleave.hoverIntent":t},d.selector)}}); |