1$('.class').prop("disabled", true);
2$('#id').prop("disabled", true);
3
4// As function
5const disable = (id) => $(`#${id}`).prop("disabled", true);
1//jQuery 1.6+ use:
2$("#submitButtonID").prop('disabled', true); //disable
3$("#submitButtonID").prop('disabled', false); //enable
4
5//jQuery 1.5 and below use:
6$("#submitButtonID").attr('disabled','disabled'); //disable
7$("#submitButtonID").removeAttr('disabled'); //enable