Answer the question
In order to leave comments, you need to log in
How to send nouislider values?
Hello. I've been trying to build a feedback form for about two months now and it so happened that I deleted js and php files... Yes, this happens too). I tried to compile it back, but now, for some reason, nouislider values do not come ... I feel that there is an error somewhere, but I can’t find it ... Help me figure it out. See:
1. The slider itself, as well as the minimum and maximum values.
<div id="slider-snap"></div>
<span id="lower"></span>
<span id="upper"></span>
var snapSlider = document.getElementById('slider-snap');
noUiSlider.create(snapSlider, {
start: [ 0, 50 ],
snap: true,
connect: true,
range: {
'min': 0,
'max': 100
}
});
var snapValues = [
document.getElementById('lower'),
document.getElementById('upper')
];
snapSlider.noUiSlider.on('update', function( values, handle ) {
snapValues[handle].innerHTML = values[handle];
});
Answer the question
In order to leave comments, you need to log in
add an input (hidden for example) and add value there from your slider :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question