1(function($) {� 2 "use strict";� 3� 4(function( $ ){� 5 // Simple wrapper around jQuery animate to simplify animating progress from your app� 6 // Inputs: Progress as a percent, Callback� 7 // TODO: Add options and jQuery UI support.� 8 $.fn.animateProgress = function(progress, callback) { � 9 return this.each(function() {� 10 $(this).animate({� 11 width: progress+'%'� 12 }, {� 13 duration: 2000, � 14 � 15 // swing or linear� 16 easing: 'swing',� 17� 18 // this gets called every step of the animation, and updates the label� 19 step: function( progress ){� 20 var labelEl = $('.ui-label', this),� 21 valueEl = $('.value', labelEl);� 22 � 23 if (Math.ceil(progress) < 20 && $('.ui-label', this).is(":visible")) {� 24 labelEl.hide();� 25 }else{� 26 if (labelEl.is(":hidden")) {� 27 labelEl.fadeIn();� 28 };� 29 }� 30 � 31 if (Math.ceil(progress) == 100) {� 32 labelEl.text('Done');� 33 setTimeout(function() {� 34 labelEl.fadeOut();� 35 }, 1000);� 36 }else{� 37 valueEl.text(Math.ceil(progress) + '%');� 38 }� 39 },� 40 complete: function(scope, i, elem) {� 41 if (callback) {� 42 callback.call(this, i, elem );� 43 };� 44 }� 45 });� 46 });� 47 };� 48})( jQuery );� 49� 50$(function() {� 51 // Hide the label at start� 52 $('#progress_bar .ui-progress .ui-label').hide();� 53 // Set initial value� 54 $('#progress_bar .ui-progress').css('width', '7%');� 55� 56 // Simulate some progress� 57 $('#progress_bar .ui-progress').animateProgress(90, function() {� 58 $(this).animateProgress(81, function() {� 59 setTimeout(function() {� 60 $('#progress_bar .ui-progress').animateProgress(90, function() {� 61 $('#main_content').slideDown();� 62 $('#fork_me').fadeIn();� 63 });� 64 }, 2000);� 65 });� 66 });� 67 � 68});� 69� 70� 71$(function() {� 72 // Hide the label at start� 73 $('#progress_bar2 .ui-progress .ui-label').hide();� 74 // Set initial value� 75 $('#progress_bar2 .ui-progress').css('width', '7%');� 76� 77 // Simulate some progress� 78 $('#progress_bar2 .ui-progress').animateProgress(72, function() {� 79 $(this).animateProgress(63, function() {� 80 setTimeout(function() {� 81 $('#progress_bar2 .ui-progress').animateProgress(72, function() {� 82 $('#main_content').slideDown();� 83 $('#fork_me').fadeIn();� 84 });� 85 }, 2000);� 86 });� 87 });� 88 � 89});� 90� 91� 92$(function() {� 93 // Hide the label at start� 94 $('#progress_bar3 .ui-progress .ui-label').hide();� 95 // Set initial value� 96 $('#progress_bar3 .ui-progress').css('width', '7%');� 97� 98 // Simulate some progress� 99 $('#progress_bar3 .ui-progress').animateProgress(80, function() {� 100 $(this).animateProgress(85, function() {� 101 setTimeout(function() {� 102 $('#progress_bar3 .ui-progress').animateProgress(80, function() {� 103 $('#main_content').slideDown();� 104 $('#fork_me').fadeIn();� 105 });� 106 }, 2000);� 107 });� 108 });� 109 � 110});� 111� 112� 113$(function() {� 114 // Hide the label at start� 115 $('#progress_bar4 .ui-progress .ui-label').hide();� 116 // Set initial value� 117 $('#progress_bar4 .ui-progress').css('width', '7%');� 118� 119 // Simulate some progress� 120 $('#progress_bar4 .ui-progress').animateProgress(94, function() {� 121 $(this).animateProgress(90, function() {� 122 setTimeout(function() {� 123 $('#progress_bar4 .ui-progress').animateProgress(94, function() {� 124 $('#main_content').slideDown();� 125 $('#fork_me').fadeIn();� 126 });� 127 }, 2000);� 128 });� 129 });� 130 � 131});� 132� 133$(function() {� 134 // Hide the label at start� 135 $('#progress_bar5 .ui-progress .ui-label').hide();� 136 // Set initial value� 137 $('#progress_bar5 .ui-progress').css('width', '7%');� 138� 139 // Simulate some progress� 140 $('#progress_bar5 .ui-progress').animateProgress(70, function() {� 141 $(this).animateProgress(90, function() {� 142 setTimeout(function() {� 143 $('#progress_bar5 .ui-progress').animateProgress(70, function() {� 144 $('#main_content').slideDown();� 145 $('#fork_me').fadeIn();� 146 });� 147 }, 2000);� 148 });� 149 });� 150 � 151});� 152� 153� 154})(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.