1 |
- var xRoll=function(a,b){xRoll.prototype.init(a,b)};xRoll.prototype={init:function(a,b){a.attr("data-state",!1);this.start(a,b);$(window).on("scroll",function(){xRoll.prototype.start(a,b)})},start:function(a,b){$(a).each(function(){var c=$(this),d=$(window).scrollTop(),e=$(window).height();!c.data().state&&d+e>$(this).offset().top+10&&(b(c),c.attr("data-state",!0),c.data().state=!0)})}};
|