1jQuery(document).ready(function($){ 2 var $um_window = $(window); 3 var window_height = $um_window.height(); 4 var half_window_height = window_height / 2 - 200; 5 $(window).load(function(){ 6 $(window).scroll(function(){ 7 $(".in_screen").each(function(){ 8 var this_offset = $(this).offset().top; 9 var window_scroll_top = $um_window.scrollTop(); 10 if( ((window_scroll_top + window_height) - this_offset) >= half_window_height){ 11 $(this).removeClass("in_screen"); 12 $(this).addClass("el_animated"); 13 } 14 }); 15 16 $.fn.countTo = function(options) { 17 // merge the default plugin settings with the custom options 18 options = $.extend({}, $.fn.countTo.defaults, options || {}); 19 20 // how many times to update the value, and how much to increment the value on each update 21 var loops = Math.ceil(options.speed / options.refreshInterval), 22 increment = (options.to - options.from) / loops; 23 24 return $(this).each(function() { 25 var _this = this, 26 loopCount = 0, 27 value = options.from, 28 interval = setInterval(updateTimer, options.refreshInterval); 29 30 function updateTimer() { 31 value += increment; 32 loopCount++; 33 $(_this).html(value.toFixed(options.decimals)); 34 35 if (typeof(options.onUpdate) == 'function') { 36 options.onUpdate.call(_this, value); 37 } 38 39 if (loopCount >= loops) { 40 clearInterval(interval); 41 value = options.to; 42 43 if (typeof(options.onComplete) == 'function') { 44 options.onComplete.call(_this, value); 45 } 46 } 47 } 48 }); 49 }; 50 51 $.fn.countTo.defaults = { 52 from: 0, // the number the element should start at 53 to: 100, // the number the element should end at 54 speed: 1000, // how long it should take to count between the target numbers 55 refreshInterval: 100, // how often the element should be updated 56 decimals: 0, // the number of decimal places to show 57 onUpdate: null, // callback method for every time the element is updated, 58 onComplete: null, // callback method for when the element finishes updating 59 }; 60 61 $(".vc_counters2").each(function(){ 62 var this_offset = $(this).offset().top; 63 var window_scroll_top = $um_window.scrollTop(); 64 if( ((window_scroll_top + window_height) - this_offset) >= half_window_height){ 65 var number = parseInt($(this).find("h2").text()); 66 if(!isNaN(number)){ 67 //$(this).find("h2").text(number); 68 $(this).find("h2").countTo({ 69 from: 0, 70 to: number, 71 speed: 1500, 72 refreshInterval: 50 73 }); 74 } 75 $(this).removeClass("vc_counters2"); 76 } 77 }); 78 }); 79 }); 80});
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.