Support

Account

Home Forums General Issues How to hide a checkbox that\'s in a fexible content box but not hide others Reply To: How to hide a checkbox that\'s in a fexible content box but not hide others

  • This is what I’ve done so far. What this does is it adds the class .current to the selected checkbox and hide the rest. The problem I have now is that when you uncheck the box, the class .current is still there and when you check on another checkbox, it doesn’t work at all.

    $(document).on("click", "#three_img_plus_feature_img input", function () {
        $("#three_img_plus_feature_img").removeClass('current');
        $(this).closest("#three_img_plus_feature_img").addClass('current');
    
        if ($(this).is(":checked")) {
            $("#three_img_plus_feature_img:not(.current) label").css("display", "none");
        } else {
            $("#three_img_plus_feature_img:not(.current) label").css("display", "block");
        }
    });