You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the demo, if you update the range => $('.range-slider').jRange('updateRange', '0,200');
Then you can call updateScale => $('.range-slider').jRange('updateScale',[0,50,100,150,200]);
Code in jquery.range.js shown below.
updateScale: function(scale, from, to) {
var s = scale || [from, to];
var prc = Math.round((100 / (s.length - 1)) * 10) / 10;
var str = '';
for (var i = 0; i < s.length; i++) {
str += '' + (s[i] != '|' ? '' + s[i] + '' : '') + '';
}
this.scale.html(str);
Hello, I found it only today when I used it. The value was updated but the style was not modified. I tried to modify the style.It is hoped that the users will have this need in the future.
Code in jquery.range.js shown below.
In the demo, if you update the range => $('.range-slider').jRange('updateRange', '0,10');
Then you can call updateScale => $('.range-slider').jRange('updateRender',[0,1,2,3,4,5,6,7,8,9,10]);
In the demo, if you update the range => $('.range-slider').jRange('updateRange', '0,200');
Then you can call updateScale => $('.range-slider').jRange('updateScale',[0,50,100,150,200]);
Code in jquery.range.js shown below.
updateScale: function(scale, from, to) {
var s = scale || [from, to];
var prc = Math.round((100 / (s.length - 1)) * 10) / 10;
var str = '';
for (var i = 0; i < s.length; i++) {
str += '' + (s[i] != '|' ? '' + s[i] + '' : '') + '';
}
this.scale.html(str);
},
The text was updated successfully, but these errors were encountered: