Disabled button still listens to click event

前端 未结 8 2602
感动是毒
感动是毒 2021-02-19 04:53

I have a problem in a form where I do some jquery validations. If a specific input field is not filled out, it should disable a \"step forward\" button by adding a disabled attr

8条回答
  •  孤独总比滥情好
    2021-02-19 05:25

    to disable:

    $('.btn-move-forward').prop("disabled", true);
    

    to re-enable:

    $('.btn-move-forward').removeClass('disabled'); // do this also.
    $('.btn-move-forward').prop("disabled", false);
    

提交回复
热议问题