I'm using the noUiSlider to link a slider and an input as shown in the example on this page: http://refreshless.com/nouislider/linking-input-fields/
$("#slider").Link('lower').to($('#input'));
That works fine. However, if the value is negative (-1), is there a way I can convert to the absolute value (1) before passing to the input? I thought something like this:
$("#slider").Link('lower').to('#input',function(value){
$(this).val(Math.abs(value));
});
That doesn't work. Any help would be appreciated. Thanks!
You can in fact reverse the direction of a slider; have a look at the direction option. 'rtl' applies to vertical sliders too, in the sense that is acts as 'bottom-to-top'.
With this option set, you'll be able to use a positive range from 0 to 15.