1
2
|
/*! jquery-visibility v1.0.12 | MIT license | http://mths.be/visibility */
!function(e,i){"function"==typeof define&&define.amd?define(["jquery"],function(t){return i(e,t)}):"object"==typeof exports?module.exports=i(e,require("jquery")):i(e,jQuery)}("undefined"!=typeof window?window:this,function(e,i,t){"use strict";function n(){"hidden"!==o&&(r.hidden=s.pageVisibility?r[o]:t)}for(var o,u,r=e.document,f=["webkit","o","ms","moz",""],s=i.support||{},d=("onfocusin"in r&&"hasFocus"in r?"focusin focusout":"focus blur");(u=f.pop())!==t;)if(o=(u?u+"H":"h")+"idden",s.pageVisibility=r[o]!==t,s.pageVisibility){d=u+"visibilitychange";break}n(),i(/blur$/.test(d)?e:r).on(d,function(e){var u=e.type,f=e.originalEvent;if(f){var s=f.toElement;(!/^focus./.test(u)||s===t&&f.fromElement===t&&f.relatedTarget===t)&&i(r).triggerHandler(o&&r[o]||/^(?:blur|focusout)$/.test(u)?"hide":"show"),n()}})});
|