[jQuery] I think I'm using the wrong syntax for radio button name
I have three radio buttons, and when a certain radio is selected I
want to show a series of checkboxes. If the other two radio buttons
are selected, I want to hide the checkboxes. I *think* the problem is
that I am using the wrong syntax to call the click() function on the
radio "name" attribute.
Example/Code here:
http://psylicyde.com/misc/jquery-validate/demo/index3.html
$("product_id").click(function () {
if ($("#multimarket").is(':checked')) {
// showcheckboxes
} else {
// hide checkboxes
}
});
<input type="radio" class="checkbox" id="market" name="product_id"
value="1"/>Single Market
<input type="radio" class="checkbox" id="multimarket"
name="product_id" value="2"/>Multiple Markets
<input type="radio" class="checkbox" id="full" name="product_id"
value="3"/>All Markets