There is a slider on noUiSlider, the range is from 3000 to 300,000. I can't figure out how to make sure that the step from 3000 to 5000 was equal to 2000, and after five it was equal to 5000. And is it possible to add a separator in the form of a space and a marker in the marker text currency? $ 5,000, $ 50,000, $ 150,000. I would be grateful for your help.
enter code here
For the changing step, you'll want to configure a non-linear slider with stepping.
For the formatting, you can set the format
option under pips
.
noUiSlider.create(slider, {
start: [3000],
range: {
min: [3000, 2000], // Start at 3000 with a step of 2000
'1.68%': [5000, 5000], // From 5000, use a step of 5000
max: [300000]
},
pips: {
mode: 'values',
values: [3000, 50000, 100000, 150000, 200000, 250000, 300000],
format: wNumb({
thousand: ',',
decimals: 0,
prefix: '$ '
})
},
});