This repository has been archived by the owner on May 30, 2024. It is now read-only.
Changing the max value after the slider has loaded #365
-
I need to alter the slider dynamically. I've figured out how to modify valueMapping, but now I need to change the total number of values too. I've tried just modifying the max value with jQuery, but that didn't work, so I figured something needed to be run after the modification, so I tried running updateOutput with just my new value - updateOutput("11") but that didn't work either. So I'm pretty stuck now, is it possible? |
Beta Was this translation helpful? Give feedback.
Answered by
andreruffert
Mar 22, 2021
Replies: 1 comment 1 reply
-
👉 https://rangeslider.js.org/#usage // Update all rangeslider instances for all
// e.g. $('input[type="range"]') elements.
// Usefull if you changed some attributes e.g. `min` or `max` etc.
$('input[type="range"]').rangeslider('update', true); Also this codepen for programmatic attribute changes should help. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
andreruffert
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
👉 https://rangeslider.js.org/#usage
Also this codepen for programmatic attribute changes should help.