No UiSlider to remove decimal?
How to remove decimal digit from linked output
I am using this code
$("#slider_01").noUiSlider({
start: [2000, 24000],
connect: true,
step: 0.01,
range: {
'min': 0,
'max': 28500
},
format: wNumb({
decimals: false,
thousand: ',',
prefix: '$ ',
})
});
$('#slider_01').Link('lower').to($('#value-lower_1'));
$('#slider_01').Link('upper').to($('#value-upper_1'));
+3
Maxim
source
to share
2 answers
Decimal values decimals: false
are not valid, please use decimals: 0
. In addition, you set the formatting for the method .val()
. Use it like this:
$('#slider_01').Link('lower').to($('#value-lower_1'), null, wNumb({
decimals: 0,
thousand: ',',
prefix: '$ ',
}));
+4
Lg102
source
to share
Change step
from 0.01
to 1
.
+1
Stobor
source
to share