0

Change value of progress bar

In HTML, you can make a progress bar with the <progress> tag. You can set a value for this tag, which is how much the progress is. I was wondering if there's a way to change the value attribute using JavaScript of JQuery?

19th May 2021, 3:45 PM
Neurobean
Neurobean - avatar
3 Respostas
+ 2
select your progress element, and assign to its 'value' property the value attribute you want to display ^^
19th May 2021, 3:49 PM
visph
visph - avatar
+ 1
with jquery you can select with $(query_selector_string) and use .val() method on it to assign the valie with vanilla js, you can select with document.querSelector(query_selector_string) and use 'value' property... in both cases, 'query_selector_string' should follow css selectors rules ;)
19th May 2021, 3:53 PM
visph
visph - avatar
0
ok i didnt think of that visph
19th May 2021, 3:49 PM
Neurobean
Neurobean - avatar