JqueryNo Comments

default thumbnail

You can reset the select dropdown in jquery like form reset. selectedIndex is used to reset the dropdown.

HTML

<select class="selectReset">
    <option>Select Value</option>
    <option value="1">1</option>
    <option value="2">2</option>
    <option value="3">3</option>
    <option value="4">4</option>
    <option value="5">5</option>
</select>

Jquery

$(".selectReset").change(function(){
    $(this).prop('selectedIndex',0);
})

Be the first to post a comment.

Add a comment