Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/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>