A jQuery question:
Given the following html, how can I get the contents of the div, jims_class, to show and hide depending upon the checked status of the mybox1 checkbox?
<script>
if ($('#mybox1').attr('checked')) {
$('.jims_class').show());
}
else {
$('.jims_class').hide());
}
</script>
<form>
<input type="checkbox" name="mybox1" id="mybox1">
<input type="checkbox" name="mybox2" id="mybox2">
</form>
<div class="jims_class">
Conditionally show this text depending on the checked status of mybox1
+...
</div>
|