Folks,

I have two checkboxes.  When either one is checked, I would like to
show a div.  When both are not checked, then I want the div hidden.
However, I've only been able to use toggle to show and hide the div
only when checking/unchecking one checkbox.  It's not quite what I
need.  So far I have this:

js:
$("#check_1").click(function(){ $("#special").toggle("slow"); });
$("#check_2").click(function(){ $("#special").toggle("slow"); });

html:
<input type="checkbox" id="check_1" name="check_options[]" value="1" /
> One <br />
<input type="checkbox" id="check_2" name="check_options[]" value="2" /
> Two <br />

<div id="special">
Some special stuff...
</div>


Any help would be appreciated.

Thanks,
Konstantin

Reply via email to