0
How do I increase the widht with %? You put this code that I did, it increases, but it’s in px, and I wanted it to increase in percentage.
var progressBar = $(".progress-bar");
setInterval(addProgress, 1000);
function addProgress() {
var width = progressBar.width() + 10;
if(progressBar.width() <= 100%) {
progressBar.width(width);
}
}
You can see that if
there, not the right one, the wrong one. How do I do this?
Increase what? What is
.progress-bar
?– Jéf Bueno
Ta seeing the progressionBar.width() + 10, this "10" will be in px, wanted it to be in %
– Lucas de Carvalho
Okay, young man. But percentage of what?
– Jéf Bueno
Rule of 3? var max = 15445; current var = XXXXX; progress_bar = (current * 100)/max;
– Don't Panic
Oxe '-' I think I was very explanatory, in case I wasn’t, sorry. But this. width() there in my code, will add +10 pixels in the width (Width) of the progressBar. Instead of adding 10pixels, I wanted to add 10% (ten percent)
– Lucas de Carvalho
Thank you Everson, how stupid of me. Thank you!
– Lucas de Carvalho