1// ProBars v1.0, Copyright 2014, Joe Mottershaw, https://github.com/joemottershaw/ 2// =============================================================================== 3 4 function animateProgressBar() { 5 jQuery('.pro-bar').each(function(i, elem) { 6 var elem = jQuery(this), 7 percent = elem.attr('data-pro-bar-percent'), 8 delay = elem.attr('data-pro-bar-delay'); 9 10 if (!elem.hasClass('animated')) 11 elem.css({ 'width' : '0%' }); 12 13 if (elem.visible(true)) { 14 setTimeout(function() { 15 elem.animate({ 'width' : percent + '%' }, 2000, 'easeInOutExpo').addClass('animated'); 16 }, delay); 17 } 18 }); 19 } 20 21 jQuery(document).ready(function() { 22 animateProgressBar(); 23 }); 24 25 jQuery(window).resize(function() { 26 animateProgressBar(); 27 }); 28 29 jQuery(window).scroll(function() { 30 animateProgressBar(); 31 32 if (jQuery(window).scrollTop() + jQuery(window).height() == jQuery(document).height()) 33 animateProgressBar(); 34 });
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.