I have a simple from with 2 radio buttons and I need to get their values if they are checked.
<form class="descriptions" id="collection" method="post" action="">
<table width="200">
<tr>
<td>
<label>Collection</label>
<input type="radio" value="collection" name="collection" />
</td>
<td>
<label>Delivery</label>
<input type="radio" value="delivery" name="collection" />
</td>
</tr>
</table>
</form>
var delivery = "";
delivery = $('input:radio:checked').val();
if(delivery == 'delivery') {
meal_deal7 = 11.49;
}else {
meal_deal7 = 9.99
}
the value of meal_deal7 is always 9.99, am I doing sth wrong.
thanks