How to get javascript to work with three checkboxes?

This works

<script type="text/javascript"> jQuery(document).ready(function(){ jQuery('input[type="checkbox"]').click(function () { jQuery('.box').hide(); if (jQuery('#checkbox3').is(':checked') && jQuery('#checkbox2').is(':checked')) jQuery('.allthree.box').show(); });}); </script>

but when i try to add another checkbox with && jQuery('#checkbox1').is(':checked')) it stops working

<script type="text/javascript"> jQuery(document).ready(function(){ jQuery('input[type="checkbox"]').click(function () { jQuery('.box').hide(); if (jQuery('#checkbox3').is(':checked') && jQuery('#checkbox2').is(':checked')) && jQuery('#checkbox1').is(':checked')) jQuery('.allthree.box').show(); });}); </script>

How can i get this to work with three checkboxes?

Thanks

Nevermind i see what i done. I have an extra “)”

3 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.