Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

AliShahbaz's avatar

How can i hide progress bar ?

hi i have the progress bar and i want to hide it. please take a look of my code and tell me how can i hide it.

Style CSS code

#myProgress { width: 100%; background-color: #ddd; }

#myBar { width: 10%; height: 30px; background-color: #4CAF50; text-align: center; line-height: 30px; color: white; }

HTML Code

10% Click Me

JavaScript Code

function move() { var elem = document.getElementById("myBar"); var width = 10; var id = setInterval(frame, 10); function frame() { if (width >= 100) { clearInterval(id); } else { width++; elem.style.width = width + '%'; elem.innerHTML = width * 1 + '%'; } } }

0 likes
2 replies
Cronix's avatar
#myBar { width: 10%; height: 30px; background-color: #4CAF50; text-align: center; line-height: 30px; color: white; display:none }

There, it's hidden.

or via code

document.getElementById("myBar").style.display = "none"; 

Please or to participate in this conversation.