I'm very new to jquey and javascript and need some help with a
function.

The function shows is a div if any of a list of check boxes are
clicked and only hides this div if all the check boxes are unchecked

The below code works in Firefox and Safari without issue, but in order
to show or hide the element in ie8, the user must click somewhere(any
where) on the page after checking a box. How can I fix the IE extra
click and is there a better way to write this function. I tried using
a class and 'each' with the check boxes but could get anything to
happen.

    $(function(){
        $("#ACH_check_box_47, #ACH_check_box_46,
#ACH_check_box_2").change(function(){
            if ($("#ACH_check_box_47").attr('checked') || $
("#ACH_check_box_46").attr('checked') ||
                $("#ACH_check_box_2").attr('checked'))
                {
                $('#sec_codes').show('fast');
            }
            else
            {
                $('#sec_codes').hide('fast');
            }

        });
        return false;

    });

Thanks,
Josh

Reply via email to