Reputation: 12512
If i build a list of items with radiobuttons next to them, how do I check the first one by default?
Upvotes: 0
Views: 517
Reputation: 13853
<input type="radio" name="group1" value="a" checked>
Simply include the checked attribute.
Or through jQuery,
$("#groupids:first").prop('checked', 'checked');
Upvotes: 6