Edit This Code:
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("#btn").click(function(){
    $("#box").animate({
      width: "400px"
    }, {
      duration: 5000,
      easing: "linear",
      step: function(x) {
        $("#demo").text(Math.round(x * 100 / 400)  + "%");  
      }
    });
  });
});
</script>
</head>
<body>

<button id="btn">Start Progress Bar</button>

<div style="border:1px solid green;margin:10px;width:400px;">
  <div id="box" style="background:#98bf21;height:50px;width:1px;border:1px solid green;"></div>
</div>

<p id="demo"></p>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy