user2828251 user2828251 - 1 year ago 74
HTML Question

HTML input range can't get current value

I'm using jQuery for getting the current range value.
for some reason I only manage to get the default value and not the user selection.

this id the HTML:

<input id="hotel-range-min" type="range" min="0" max="200" value="20" />

and this is how I'm trying to get the current value:


no matter if the user changes the value, the alert is always 20 and it's need to be the current value.

I've added a JSfiddle (I'm trying to get the minimum value from the range field, now it's by alert when button click):

Answer Source