Can JQuery 'check' a radio button for me
Hi,
I have the following form with 4 radio buttons, and the first one checked by default.
-
<form name="sub_categories1">
<input name="sub_cat1" type="radio" value="sub_cat1_viewAll" checked="checked">
<input name="sub_cat1" type="radio" value="sub_cat1_1a">
<input name="sub_cat1" type="radio" value="sub_cat1_1b">
<input name="sub_cat1" type="radio" value="sub_cat1_1c">
<input name="sub_cat1" type="radio" value="sub_cat1_1d"> </form>
If I have a button/link (with a class .change_1a) somewhere else on the page, can I have that button change the form so that now the 'sub_cat1_1a' radio button is checked instead of the viewAll one?
$('.change_a1').click(function() {
// change the form so that now the sub_cat1_1a radio button is checked instead
});
Thanks!