|
|
!function(o){var n=[],p=!1,f=!1,u={interval:250,force_process:!1},s=o(window),d=[];function i(){return o(this).is(":appeared")}function c(){return!o(this).data("_appear_triggered")}function l(){f=!1;for(var e=0,r=n.length;e<r;e++){var t=o(n[e]).filter(i);if(t.filter(c).data("_appear_triggered",!0).trigger("appear",[t]),d[e]){var a=d[e].not(t);a.data("_appear_triggered",!1).trigger("disappear",[a])}d[e]=t}}o.expr.pseudos.appeared=o.expr.createPseudo(function(e){return function(e){var r=o(e);if(!r.is(":visible"))return!1;var t=s.scrollLeft(),a=s.scrollTop(),i=r.offset(),n=i.left,p=i.top;return p+r.height()>=a&&p-(r.data("appear-top-offset")||0)<=a+s.height()&&n+r.width()>=t&&n-(r.data("appear-left-offset")||0)<=t+s.width()}}),o.fn.extend({appear:function(e,r){return o.appear(this,r),this}}),o.extend({appear:function(e,r){var t,a=o.extend({},u,r||{});if(!p){function i(){f||(f=!0,setTimeout(l,a.interval))}o(window).scroll(i).resize(i),p=!0}a.force_process&&setTimeout(l,a.interval),t=e,n.push(t),d.push()},force_appear:function(){return!!p&&(l(),!0)}})}("undefined"!=typeof module?require("jquery"):jQuery);
|