summaryrefslogtreecommitdiff
path: root/http/3rdParty/jquery-scrollstop-master/jquery.scrollstop.min.js
blob: cbb9fe5f618215abca2802ab5e6593453c6488e0 (plain)
1
2
3
4
5
/*!
 * jQuery Scrollstop Plugin v1.1.0
 * https://github.com/ssorallen/jquery-scrollstop
 */
(function(e){var b=e.event.dispatch||e.event.handle;var a=e.event.special,d="D"+(+new Date()),c="D"+(+new Date()+1);a.scrollstart={setup:function(h){var g=e.extend({latency:a.scrollstop.latency},h);var i,f=function(l){var j=this,k=arguments;if(i){clearTimeout(i)}else{l.type="scrollstart";b.apply(j,k)}i=setTimeout(function(){i=null},g.latency)};e(this).bind("scroll",f).data(d,f)},teardown:function(){e(this).unbind("scroll",e(this).data(d))}};a.scrollstop={latency:250,setup:function(h){var g=e.extend({latency:a.scrollstop.latency},h);var i,f=function(l){var j=this,k=arguments;if(i){clearTimeout(i)}i=setTimeout(function(){i=null;l.type="scrollstop";b.apply(j,k)},g.latency)};e(this).bind("scroll",f).data(c,f)},teardown:function(){e(this).unbind("scroll",e(this).data(c))}}})(jQuery);