The check box has become a check box. I don't know what went wrong.

I just want to check that there is no medical history, and the other four items are unchecked

check any of the other four items. No medical history is not selected.
but now that the other four items are singled, the other selected items will also be unchecked.

the environmental background of the problems and what methods you have tried

related codes

< div class= "ill_his_btn clearfix" >

        <label class="weui-btn weui-btn_mini weui-btn_primary"><input name="medical_history[]{if strpos($case.medical_history,"")!==false}" checked="checked{/if}" value="" type="checkbox"></label>
        <label class="weui-btn weui-btn_mini weui-btn_primary"><input name="medical_history[]{if strpos($case.medical_history,"")!==false}" checked="checked{/if}" value="" type="checkbox"></label>
        <label class="weui-btn weui-btn_mini weui-btn_primary"><input name="medical_history[]{if strpos($case.medical_history,"")!==false}" checked="checked{/if}" value="" type="checkbox"></label>
        <label class="weui-btn weui-btn_mini weui-btn_primary"><input name="medical_history[]{if strpos($case.medical_history,"")!==false}" checked="checked{/if}" value="" type="checkbox"></label>
        <label class="weui-btn weui-btn_mini weui-btn_primary"><input name="medical_history[]{if strpos($case.medical_history,"")!==false}" checked="checked{/if}" value="" type="checkbox"></label>
        
    </div>


$("input [type = "checkbox"]") .click (function () {

            console.log($($(this).parent().siblings()[0]).children());
            var v = this.value;
            if(v = ""){
                if(this.checked){
                    $(this).parent().removeClass("weui-btn_default").addClass("weui-btn_primary");
                    $(this).parent().siblings().removeClass("weui-btn_primary").addClass("weui-btn_default").children().each(function(){
                        this.checked = false;
                    })
                }else{
                    $(this).parent().removeClass("weui-btn_primary").addClass("weui-btn_default");
                }
            }else{
                if(this.checked){
                    $(this).parent().removeClass("weui-btn_default").addClass("weui-btn_primary");
                    $(".weui-btn:first-child").removeClass("weui-btn_primary").addClass("weui-btn_default").children().each(function(){
                        this.checked = false;
                    })
                }else{
                    $(this).parent().removeClass("weui-btn_primary").addClass("weui-btn_default");
                }
            }
        })

what result do you expect? What is the error message actually seen?

Jun.25,2021

if (v ='No medical history') = > if (v = ='no medical history')

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e505ff-450aa.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e505ff-450aa.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?