<script type="text/javascript"> $(document).ready(function() { $('#agree').change(function() { if ($(this).is(':checked')) $('#add input[name="resume_add"]').removeAttr('disabled'); else $('#add input[name="resume_add"]').attr('disabled', 'disabled'); }); }); </script> <input id="agree" type="checkbox" value="1" name="agree">Я согласен на предоставление информации <input id="add" type="submit" name="resume_add" value="Отправить" disabled> 

So for some reason it does not work. But I do not know why.

    1 answer 1

    according to script logic, resume_add must be inside the element with id==add . And you - this is the same element. Why is it so difficult to contact him if he has a completely unique id ?

     if ($(this).is(':checked')) $('#add').removeAttr('disabled'); else $('#add').attr('disabled', 'disabled'); 

    That should work.