JSFiddle - React, Tailwind, and code Playground

by Paulpro

HTML

<body>
    <div>
        <span id="pbarlabel">Processing Data</span>:<br />
        <progress id="pbar" value="0" max="100"></progress>
        <span id="pbarval"></span>
    </div>
</body>

JavaScript

$(document).ready(function () {
     var max= 200,
         cur=0;
     function updatePBar(){
         cur++;
         jQuery("#pbar").val(cur*100/max);
         jQuery("#pbarval").html("" + Math.ceil(cur*100/max) + "%");
         if (cur<max){
             setTimeout(updatePBar, 10);
         }
     }
     updatePBar();
 });