$("#button").attr("disabled", true);
//for a class
$('.inputDisabled').prop("disabled", false);
//for a ID
$('#inputDisabled').prop("disabled", false);
$('#edit').click(function(){ // click to
$('.inputDisabled').attr('disabled',false); // removing disabled in this class
});
$('.class').prop("disabled", true);
$('#id').prop("disabled", true);
// As function
const disable = (id) => $(`#${id}`).prop("disabled", true);
<a href="#" id="button" role="button"> Click me </a>
<script>
$("#button").attr("disabled", true); // disabled = true
// $("#button").attr("disabled", false); // disabled = false
// attr cannot pls switch to prop
$('#button').prop("disabled", true);
</script>
$("#edit").click(function(event){
event.preventDefault();
$('.inputDisabled').prop("disabled", false); // Element(s) are now enabled.
});
function disable(i){
$("#rbutton_"+i).prop("disabled",true);
}