Hello. It is necessary to check whether the checkbox is checked on the page and remove the attribute from submit - disabled.
<input type="checkbox" id="check" name="mods[]"> <input type="checkbox" id="check" name="mods[]"> <input type="checkbox" id="check" name="mods[]"> <input type="checkbox" id="check" name="mods[]"> <input type="checkbox" id="check" name="mods[]"> <input type="submit" class="but" disabled="disabled"> $('#check:input:checkbox').click(function(){ if($(this).prop("checked") == true){ $('.but').removeAttr('disabled'); }else{ $('.but').attr('disabled', true); } }); The code works only on 1 checkbox, i.e. Clicking on 2 and the following will not happen. How to make the code work on all checkbox.
Why can not I use class="check" , they are busy and change depending on the category
Why can not I use input:checkbox , there are other checkbox on the page