So you would need to update
data-progrecss="X"
using JS or whatever at each "progress step" update. data-progrecss="X"
using JS or whatever at each "progress step" update.I wanted to make the demo page as minimalist as possible. Maybe I will just add (using js) after step three.
But yes you can use js, something like
$('.myprogrecss').attr('data-progrecss', <PERCENT>); (if using jQuery)
Or I believe Document.getElementById('myProgrecss').setAttribute('data-progrecss', <PERCENT>);
DISCLAIMER, this code just popped out of my head so it's probably not quite correct but near abouts.EDIT: I've added that little piece to the demo page.
$('.myprogrecss').data('progrecss', 60);Thanks!
I don't know why jq does this.
It's always good to know things like this.
Thanks again!
To your point, performance is noble goal. Having some asymmetry is no big deal.
Thanks
Since you can't really set element attributes to non-string values, trying to sync the 'data' values with element attributes raises all sorts of unwanted problems.
document.getElementById('myProgrecss').dataset.progrecss = '<PERCENT>';
[0]: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement...Thanks for that :) I was actually unaware of that method and I prefer that style if I'm honest.
Thanks!