Change the Progress bar layer value
⚠️ This article was created for developers!
To be able to follow the steps, you're required to have coding knowledge. If you're not a developer and can't achieve what you're looking for, consider hiring a developer.
Make sure to carefully follow the tutorial and write correct code. We're unable to provide help with custom coding, or the possible issues that are happening because of them.
- value: the new value of the progress bar
- duration: the duration of the animation in milliseconds
💡 Tip: The code targets the first progress bar on the page. If you want to decide which progress bar do you want it to change, strenghten the code with the Slider selector (#n2-ss-[ID]) or add a CSS class to your progress bar.
Example: I added the class
increase so I can use this code:
n2('.increase .n2-ss-item-progressbar').data('counter').to(10, 3000);