Start/stop intermediate progress #866
-
I feel like this is a really dumb question, but how can I leave the intermediate progress bar visible, but start/stop it? I have tried different values in the "value" attribute (0, null etc), but it seems as though it's the absence of the "value" attribute which converts it to intermediate, which I'm not sure it possible, dynamically. Any clues would be great :) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I think this will works. |
Beta Was this translation helpful? Give feedback.
-
Excellent, thank you so much
…On Mon, Jun 20, 2022, 12:49 AM tamagoez ***@***.***> wrote:
I think this will works
https://codesandbox.io/s/vibrant-christian-hg6wgm?file=/pages/index.js
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress#:~:text=To%20change%20the%20progress%20bar%20to%20indeterminate%20after%20giving%20it%20a%20value%20you%20must%20remove%20the%20value%20attribute%20with%20element.removeAttribute(%27value%27)
.
—
Reply to this email directly, view it on GitHub
<#866 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAPG6BK2APLH2R6RQNYXQIDVP4XOJANCNFSM5Y6EJPEQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
I think this will works.
First, Give ID to your element.
If you want to make it indeterminate, execute
document.getElementById("id").removeAttribute('value')
.If you want to make fixed one, add value attribute like
document.getElementById("id").value = "0.5"
.I hope you can solve!
Ex: https://codesandbox.io/s/vibrant-christian-hg6wgm?file=/pages/index.js
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/progress#:~:text=To%20change%20the%20progress%20bar%20to%20indeterminate%20after%20giving%20it%20a%20value%20you%20must%20remove%20the%20value%20attribute%20with%20element.removeAttribute(%27value%27).