PHP Classes

File: public/public/modules/theme-business/js/vendor/jquery.appear.min.js

Recommend this page to a friend!
  Classes of Maniruzzaman Akash   LaraCMS   public/public/modules/theme-business/js/vendor/jquery.appear.min.js   Download  
File: public/public/modules/theme-business/js/vendor/jquery.appear.min.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: LaraCMS
Content management system based on Laravel
Author: By
Last change:
Date: 1 year ago
Size: 1,422 bytes
 

Contents

Class file image Download
!function(e,a){"function"==typeof define&&define.amd?define(["jquery"],a):"object"==typeof module&&module.exports?a(require("jquery")):a(e.jQuery)}(this,function(n){n.fn.appear=function(r,e){var l=n.extend({data:void 0,one:!0,accX:0,accY:0},e);return this.each(function(){var u,a,e,d=n(this);d.appeared=!1,r?(u=n(window),a=function(){var e,a,r,n,p,t,c,i,o,f,s;d.is(":visible")?(e=u.scrollLeft(),a=u.scrollTop(),n=(r=d.offset()).left,p=r.top,t=l.accX,c=l.accY,i=d.height(),o=u.height(),f=d.width(),s=u.width(),a<=p+i+c&&p<=a+o+c&&e<=n+f+t&&n<=e+s+t?d.appeared||d.trigger("appear",l.data):d.appeared=!1):d.appeared=!1},e=function(){var e;d.appeared=!0,l.one&&(u.unbind("scroll",a),0<=(e=n.inArray(a,n.fn.appear.checks))&&n.fn.appear.checks.splice(e,1)),r.apply(this,arguments)},l.one?d.one("appear",l.data,e):d.bind("appear",l.data,e),u.scroll(a),n.fn.appear.checks.push(a),a()):d.trigger("appear",l.data)})},n.extend(n.fn.appear,{checks:[],timeout:null,checkAll:function(){var e=n.fn.appear.checks.length;if(0<e)for(;e--;)n.fn.appear.checks[e]()},run:function(){n.fn.appear.timeout&&clearTimeout(n.fn.appear.timeout),n.fn.appear.timeout=setTimeout(n.fn.appear.checkAll,20)}}),n.each(["append","prepend","after","before","attr","removeAttr","addClass","removeClass","toggleClass","remove","css","show","hide"],function(e,a){var r=n.fn[a];r&&(n.fn[a]=function(){var e=r.apply(this,arguments);return n.fn.appear.run(),e})})});