1/** 2 * jQuery Line Progressbar 3 * Author: KingRayhan<[email protected]> 4 * Author URL: http://rayhan.info 5 * Version: 1.0.0 6 */ 7 8(function ($) { 9 'use strict'; 10 11 12 $.fn.LineProgressbar = function (options) { 13 14 options = $.extend({ 15 percentage: null, 16 // ShowProgressCount: true, 17 duration: 3000, 18 19 // Styling Options 20 fillBackgroundColor: '#e30018', 21 backgroundColor: '#EEEEEE', 22 radius: '0px', 23 height: '5px', 24 width: '100%' 25 }, options); 26 27 $.options = options; 28 return this.each(function (index, el) { 29 // Markup 30 $(el).html('<div class="progressbar fixed-top"><div class="proggress"></div><div class="percentCount"></div></div>'); 31 32 33 34 var progressFill = $(el).find('.proggress'); 35 var progressBar = $(el).find('.progressbar'); 36 37 38 progressFill.css({ 39 backgroundColor: options.fillBackgroundColor, 40 height: options.height, 41 borderRadius: options.radius 42 }); 43 progressBar.css({ 44 width: options.width, 45 backgroundColor: options.backgroundColor, 46 borderRadius: options.radius 47 }); 48 49 // Progressing 50 progressFill.animate( 51 { 52 width: options.percentage + "%" 53 }, 54 { 55 step: function (x) { 56 if (options.ShowProgressCount) { 57 $(el).find(".percentCount").text(Math.round(x) + "%"); 58 } 59 }, 60 duration: options.duration 61 } 62 );
63 //////////////////////////////////////////////////////////////////// 64 }); 65 } 66 $.fn.progressTo = function (next) { 67 68 let options = $.options; 69 70 return this.each(function (index, el) { 71 72 var progressFill = $(el).find('.proggress'); 73 var progressBar = $(el).find('.progressbar'); 74 75 progressFill.animate( 76 { 77 width: next + "%" 78 }, 79 { 80 step: function (x) { 81 if (options.ShowProgressCount) { 82 $(el).find(".percentCount").text(Math.round(x) + "%"); 83 } 84 }, 85 duration: options.duration 86 } 87 ); 88 //////////////////////////////////////////////////////////////////// 89 }); 90 } 91 92})(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.