How to remove disabled attribute using jQuery?

To remove disabled attribute using jQuery, use the removeAttr() method. You need to first remove the property using the prop() method. It will set the underlying Boolean value to false.


You can try to run the following code to learn how to remove disabled attribute using jQuery:

Live Demo

<!DOCTYPE html>
<script src=""></script>

    $('.disabledCheckboxes').prop("disabled", true);

        $('button').on('click', function() {
          if (this.hasAttribute("disabled")) {
             alert('The disabled attribute exists')
          } else {
             alert('The disabled attribute does not exist')
<input type="checkbox" class="disabledCheckboxes" disabled>
<input type="checkbox" class="disabledCheckboxes" disabled="disabled">
   <button class='button'>Result</button>