153
rated 0 times
[
158]
[
5]
/ answers: 1 / hits: 7001
/ 10 Years ago, fri, july 18, 2014, 12:00:00
I have a pair of inputs that are text and range types respectively
<input type=range min=100 max=100000 val=1000 step=1000 id=priceSliderMin></input>`
<input type=text id=priceTextMin></input>
I also have a pair of jQuery functions that update the partner input as the other changes.
$('#priceSliderMin').change(function(event){
$('#priceTextMin').prop('value', parseInt($('#priceSliderMin').prop('value')));
});
$('#priceTextMin').keyup(function(event){
$('#priceSliderMin').prop('value', parseInt($('#priceTextMin').prop('value')))
})
The problem is that the slider doesn't update the text field until I release the mouse button. Is there a way I could update it as it moves? I found an example using raw JavaScript that seems to work, but I can't replicate it with jQuery, even when using Chrome.
More From » html