Progress Bar With jquery

Create a Progress Bar With Javascript
$(document).ready(function () {
    $("#progress").mouseover(loopLi);
});

function loopLi() { // this code is executed every 1 seconds:
    var i = 0;
    setInterval(function () {
       if (i != 101) {
           $("#percent").html(i + "%");
           $("#bar").css('width', i + '%');
           i++;
       }
    }, 1000);
}
<div id="progress">
    <span id="percent">40%</span>
    <div id="bar"></div>
</div>
Demo / Download
Progress Bar With jquery Progress Bar With jquery Reviewed by Bhaumik Patel on 10:18 PM Rating: 5