I have a Bootstrap component in this case a progress bar and I want to change a value in this progress bar using JavaScript.
<div id="barra1">
<h3 class="progress-title">Paso 1</h3>
<div class="progress blue">
<div class="progress-bar progress-bar-striped active" role="progressbar" style="width:0%;">
<div class="progress-value">0%</div>
</div>
</div>
</div>
I tried the following but it does not work:
document.getElementById("barra1.progress-value").innerHTML = "5%";
On the other hand, if I put directly into the element that is inside the component, it works but I would prefer to refer to the component 'barra1' from the container div in some way so that the code could be better understood, since I can have many more components .
<div id="idValue" class="progress-value">0%</div>
document.getElementById("idValue").innerHTML = "5%";