Constantine Constantine - 2 years ago 123
jQuery Question

HTML5 reset slider to min position

What I am trying to do is get the slider to reset it's value and animation position to zero but I can't find how.



<select id="selectSymptom">
<option value="option" >Select Option</option>
<option value="option1" >Option 1</option>
<option value="option2">Option 2</option>
<option value="option3">Option 3</option>
<option value="option4">Option 4</option>
<option value="option5">Option 5</option>
<option value="option6">Option 6</option>

<span style='display:none;' id="slider"> <input type="range" min="0" max="10" value="0" step="0.1" id="rangeValue"><label id="text">0</label></span>



$('#selectSymptom').on('change', function() {

var selected = $(this).find('option:selected').val();
$("#rangeValue").mousemove(function() {

Answer Source

Simply set it's value to 0 in the change event of the dropdown


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download