Notice: The Monaca & Onsen UI Community Forum is shutting down.
For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.
Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.
change value of ons-range via javascript don't work fine
-
Hello, I’m new to the onsen-ui, I’m try to create a simple script for change a range via javascript (or jquery), the percent of bar change but the handle stay blocked, there is a kind of refresh?
the code is here: https://codepen.io/maximilion/pen/oOMdXB
I do this because I must set some ons-range and other form items from variables locate in localStorage
strange thing: if I push the button when page is loaded (whitout move manually the handle) and press CTRL+SHIFT+I on my chrome browser the ons-range it seems to work!
-
Write it as follows:
document.getElementById(‘range1’).value = 75;
-
Great, it works.
I try also:
$(’#range1’).val(75);
and the result is the same
Thankyou.