Reputation: 2246
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
});
Upvotes: 3
Views: 575
Reputation: 12485
You can also change it to mousemove
$("#length").mousemove(function(){
len = $("#length").val();
$("#password-length").html(len);
});
Upvotes: 1