> 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.
I would just use a straight show/hide since the toggle conditions are unusual. Something like this should work but I haven't tried it. $("#check_1, #check_2").click(function(){ var showit = $("#check_1:checked, #check_2:checked").length; $("#special")[showit? "show" : "hide"]("slow"); }); The conditional on showit is choosing to call either the show or hide method. In the case where #special is already in the right state, the extra show/hide shouldn't hurt anything.