JohnCoene / waiter

🕰️ Loading screens for Shiny
https://waiter.john-coene.com/
Other
495 stars 25 forks source link

Add "id" to progress bar object #119

Closed genec1 closed 2 years ago

genec1 commented 2 years ago

I'm trying to use shinyjs to programmatically change the color of an attendant progress bar. I am able to successfully change the background color and the border color, but not the progress bar color itself. I suspect this is because the id associated with the progress bar div is a wrapper around the progress bar div itself. This div does not have an id and the color I'm assigning to the outer div is overwritten by the inner div.

This is the html source of a sample progress bar, showing the outer and inner divs, where "my_progress_bar" is the ID that I specify for the attendant. I think if there was an ID for the inner div, I'd be able to accomplish what I'm trying to do with shinyjs.

Thanks!

<div class="progress " id="my_progress_bar" style=" height: 50px;width:100%;background-color:#f5f5f5;">
  <div class="progress-bar bg-success progress-bar-striped progress-bar-animated" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
</div>
JohnCoene commented 2 years ago

What function from shinyjs do you use to do that? It's just a matter of getting the selector #my_progress_bar > div should work

JohnCoene commented 2 years ago

I'll assume this is OK and close, let me know if it is not