forum

Home / DeveloperSection / Forums / noUiSlider - limit values

noUiSlider - limit values

Anonymous User 2433 01-Feb-2015

I have a slider with pips from 21 to 30 with 10 markers between the numbers (like a ruler) and I have a step size of 0.5. Is there a way to limit values, so the user cannot go under 21.5 but the marker starts from 21? I wouldn't listen to onchange, because I want to block dragging under 21.5.

Testlink: http://codepen.io/anon/pen/dPGgzK

$('#slider').noUiSlider({
    start: 21.5,
    step: 0.5,
    range: {
        'min': 21,
        'max': 31,
        '10%': 22,
        '20%': 23,
        '30%': 24,
        '40%': 25,
        '50%': 26,
        '60%': 27,
        '70%': 28,
        '80%': 29,
        '90%': 30,
        '100%': 31
    }
});
 
$('#slider').noUiSlider_pips({
    mode: 'range',
    density: 1
});


Updated on 01-Feb-2015
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By