I am writing a web page for the mobile use, and I add a reset button to reset radio button but it not work. I have try to solve in many way, like
$('select#qty1 option').attr('selected', false);
$('select#qty1 option').removeAttr('selected');
$('select#qty1').children('option').removeAttr('selected').filter(':nth-child(1)').attr('selected', true);
$('select#qty1').attr('selectedIndex', -1);
but all of them do not work.
Radio button
<tr>
<td><a href='#myPopup' data-rel='popup' class='ui-btn ui-shadow ui-corner-all ui-icon-info ui-btn-icon-notext' data-position-to='window'>info</a></td>
<td>Pizza</td>
<td>$100</td>
<td>
<select type='radio' data-native-menu='false' name='qty1' id='qty1'>
<option value='0'>0</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>
</td>
</tr>
Reset button
<input id="reset1" type="button" value="Reset">
script
$("#reset1").click(function(){
$('select#qty1').attr('selectedIndex', -1);
});