1///////////////////////////////////////////// 2// SMARTRESIZE PLUGIN 3///////////////////////////////////////////// 4 5(function($,sr){ 6 7 // USE STRICT 8 "use strict"; 9 10 // debouncing function from John Hann 11 // http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/ 12 var debounce = function (func, threshold, execAsap) { 13 var timeout; 14 15 return function debounced () { 16 var obj = this, args = arguments; 17 function delayed () { 18 if (!execAsap) { 19 func.apply(obj, args); 20 timeout = null; 21 } 22 } 23 24 if (timeout) { 25 clearTimeout(timeout); 26 } else if (execAsap) { 27 func.apply(obj, args); 28 } 29 30 timeout = setTimeout(delayed, threshold || 100); 31 }; 32 }; 33 34 // smartresize 35 jQuery.fn[sr] = function(fn){ return fn ? this.on('resize', debounce(fn)) : this.trigger(sr); }; 36 37})(jQuery,'smartresize');
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.