I have a range, and I want to update the span that displays its numeral value instantly. The code that I have works, but only displays numeral value when you stop holding the left click down.
Here's what I have:
$("#length").change(function(){ // when range is altered, execute function
len = $("#length").val(); // set variable "len" to the numeral value of range
$("#password-length").html(len); // set "len" (numeral value) to a span
});
Fiddle.
You could check for both the input and change events to achieve this.
In this case:
$("#length").on('input change', function(){
$("#password-length").html(this.value);
});
jsFiddle here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With