1// To disable:
2document.getElementById('id').style.pointerEvents = 'none';
3// To re-enable:
4document.getElementById('id').style.pointerEvents = 'auto';
5// Use '' if you want to allow CSS rules to set the value
1function load(recieving_id){
2 $('#roommate_but').prop('disabled', true);
3 $.get('include.inc.php?i=' + recieving_id, function(data) {
4 $("#roommate_but").html(data);
5 });
6}