I have a simple form:
<div class="class_a">
<fieldset>
<label><input type="radio" id="radio10" name="color" value="1" />Red</label><br />
<label><input type="radio" name="color" value="2" />Yellow</label><br />
<label><input type="radio" name="color" value="3" />Blue</label><br />
<label><input type="radio" name="color" value="4" />Purple</label><br />
</fieldset>
</div>
<div class="block-cms">
<fieldset>
<label><input type="radio" name="time" value="6" />12</label><br />
<label><input type="radio" name="time" value="7" />11</label><br />
<label><input type="radio" name="time" value="8" />10</label><br />
<label><input type="radio" name="time" value="9" />9</label><br />
</fieldset>
</div>
What im trying to do here is by using jQuery change() hide off second fieldset.
$("input#radio10").change(function () {
var checked = true;
checked = checked && $(this).is(':checked');
if ($('input#radio10:checked') ) {
$('.block-cms').show()
}
else {
$('.block-cms').hide();
}
});
Not sure what con be wrong here. Can anyone suggest me what should be done different please?