Answer the question
In order to leave comments, you need to log in
How to make range slider state update instantly?
Essentially you need no additional plugins. The code I provide is working. What is missing is that the value in the field is updated as the slider is dragged, and not after it is released. How?
//Диапазон значений:
$(function(){
$("input[type=range]").each(function(){
$(this).wrap('<div class="range-wrapper"></div>');
var min = $(this).attr("min");
var max = $(this).attr("max");
var step = $(this).attr("step");
var input = $('<input class="narrow-input" type="number" min="'+min+
'" max="'+max+
'" step="'+step+'">');
$(this).after(input);
$(input).val($(this).val())
$(this).change(function(){
$(input).val($(this).val());
})
$(input).change(function(){
$(input).prev().val($(input).val());
})
});
});
//============================================================
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question