1/** 2* jQuery scroroller Plugin 1.0 3* 4* http://www.tinywall.net/ 5* 6* Developers: Arun David, Boobalan 7* Copyright (c) 2014 8*/ 9(function($){ 10 $(document).ready(function(){ 11 $('body').prepend("<div style='position:fixed;top:0px;left:0px;width:0;height:0;' id='scrollzipPoint'></div>" ); 12 $(document).rollerInit(); 13 $('.numscroller').scrollzip({ 14 showFunction : function() { 15 numberRoller($(this).attr('data-slno')); 16 }, 17 wholeVisible : false, 18 }); 19 }); 20 $(document).on("scroll resize", function(){ 21 $('.numscroller').scrollzip({ 22 showFunction : function() { 23 numberRoller($(this).attr('data-slno')); 24 }, 25 wholeVisible : false, 26 }); 27 }); 28 $.fn.rollerInit=function(){ 29 var i=0; 30 $('.numscroller').each(function() { 31 i++; 32 $(this).attr('data-slno',i); 33 $(this).addClass("roller-title-number-"+i); 34 }); 35 }; 36 $.fn.scrollzip = function(options){ 37 var settings = $.extend({ 38 showFunction : null, 39 hideFunction : null, 40 showShift : 0, 41 wholeVisible : false, 42 hideShift : 0, 43 }, options); 44 return this.each(function(i,obj){ 45 $(this).addClass('scrollzip'); 46 if ( $.isFunction( settings.showFunction ) ){ 47 if( 48 !$(this).hasClass('isShown')&& 49 ($(window).outerHeight()+$('#scrollzipPoint').offset().top-settings.showShift)>($(this).offset().top+((settings.wholeVisible)?$(this).outerHeight():0))&& 50 ($('#scrollzipPoint').offset().top+((settings.wholeVisible)?$(this).outerHeight():0))<($(this).outerHeight()+$(this).offset().top-settings.showShift) 51 ){ 52 $(this).addClass('isShown'); 53 settings.showFunction.call( this ); 54 } 55 } 56 if ( $.isFunction( settings.hideFunction ) ){ 57 if( 58 $(this).hasClass('isShown')&& 59 (($(window).outerHeight()+$('#scrollzipPoint').offset().top-settings.hideShift)<($(this).offset().top+((settings.wholeVisible)?$(this).outerHeight():0))|| 60 ($('#scrollzipPoint').offset().top+((settings.wholeVisible)?$(this).outerHeight():0))>($(this).outerHeight()+$(this).offset().top-settings.hideShift)) 61 ){ 62 $(this).removeClass('isShown'); 63 settings.hideFunction.call( this ); 64 } 65 } 66 return this; 67 }); 68 }; 69 function numberRoller(slno){ 70 var min=parseInt($('.roller-title-number-'+slno).attr('data-min')); 71 var max=parseInt($('.roller-title-number-'+slno).attr('data-max')); 72 var timediff=parseInt($('.roller-title-number-'+slno).attr('data-delay')); 73 var increment=parseInt($('.roller-title-number-'+slno).attr('data-increment')); 74 var numdiff=max-min; 75 var timeout=(timediff*1000)/numdiff; 76 //if(numinc<10){ 77 //increment=Math.floor((timediff*1000)/10); 78 //}//alert(increment); 79 numberRoll(slno,min,max,increment,timeout); 80 81 } 82 function numberRoll(slno,min,max,increment,timeout){//alert(slno+"="+min+"="+max+"="+increment+"="+timeout); 83 if(min<=max){ 84 $('.roller-title-number-'+slno).html(min); 85 min=parseInt(min)+parseInt(increment); 86 setTimeout(function(){numberRoll(eval(slno),eval(min),eval(max),eval(increment),eval(timeout))},timeout); 87 }else{ 88 $('.roller-title-number-'+slno).html(max); 89 } 90 } 91})(jQuery);
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.