I am trying to achieve UI as shown in the image. However I am having little hard time after trying combinations of positioning now I am clueless. Can someone help me with th
Just change the onclick function as follows and you will have an animated version of the accepted solution
$('.changeprogress').click(function() {
var width = 1;
var percent = $(this).text().replace('%','') ;
var id = setInterval(frame, 25);
function frame() {
if (width >= percent) {
clearInterval(id);
} else {
width++;
$('.bar').css('width', width + '%');
$('.percent').text(width + '%');
}
}
});
http://jsfiddle.net/Zfzva/418/ can see it here.
thanks to
https://stackoverflow.com/a/5865894/2815227
https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_progressbar_3