JSFiddle - React, Tailwind, and code Playground
by iR0man
HTML
<div class="progress0"></div>
<button id="start">
Start
</button>
CSS
.progress0{height:20px;margin:10px 0 0;width:0;background-color: blue;transition: width 100ms linear}
JavaScript
var arr = [];
for (var i = 0; i < 50; i++) {
arr.push(i);
};
$('#start').on("click",function(){
var str = '';
$(arr).each(function(i,a){
$.ajax({
type: 'GET',
url: 'https://google.com',
async: false,
complete: function () {
$(".progress0").css("width",i*2+'%');
}
});
});
});