vendor: 2,139 bytes, lines 1-71
1/* http://james.padolsey.com/javascript/special-scroll-events-for-jquery/ */ 2 3(function(){ 4 5 var special = jQuery.event.special, 6 uid1 = 'D' + (+new Date()), 7 uid2 = 'D' + (+new Date() + 1); 8 9 special.scrollstart = { 10 setup: function() { 11 12 var timer, 13 handler = function(evt) { 14 15 var _self = this, 16 _args = arguments; 17 18 if (timer) { 19 clearTimeout(timer); 20 } else { 21 evt.type = 'scrollstart'; 22 jQuery.event.handle.apply(_self, _args); 23 } 24 25 timer = setTimeout( function(){ 26 timer = null; 27 }, special.scrollstop.latency); 28 29 }; 30 31 jQuery(this).bind('scroll', handler).data(uid1, handler); 32 33 }, 34 teardown: function(){ 35 jQuery(this).unbind( 'scroll', jQuery(this).data(uid1) ); 36 } 37 }; 38 39 special.scrollstop = { 40 latency: 300, 41 setup: function() { 42 43 var timer, 44 handler = function(evt) { 45 46 var _self = this, 47 _args = arguments; 48 49 if (timer) { 50 clearTimeout(timer); 51 } 52 53 timer = setTimeout( function(){ 54 55 timer = null; 56 evt.type = 'scrollstop'; 57 jQuery.event.handle.apply(_self, _args); 58 59 }, special.scrollstop.latency); 60 61 }; 62 63 jQuery(this).bind('scroll', handler).data(uid2, handler); 64 65 }, 66 teardown: function() { 67 jQuery(this).unbind( 'scroll', jQuery(this).data(uid2) ); 68 } 69 }; 70 71})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.