Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jquery add disabled to button

$("#button").attr("disabled", true);
Comment

enable button jquery

$('#ButtonId').prop('disabled', false);
Comment

jquery disable button

$('.class').prop("disabled", true);
$('#id').prop("disabled", true);

// As function
const disable = (id) => $(`#${id}`).prop("disabled", true);
Comment

enabled disabled button jquery

<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>
Comment

jquery disable button

function disable(i){
    $("#rbutton_"+i).prop("disabled",true);
}
Comment

disable button click jquery

function load(recieving_id){
    $('#roommate_but').prop('disabled', true);
    $.get('include.inc.php?i=' + recieving_id, function(data) {
        $("#roommate_but").html(data);
    });
}
Comment

How to disable and enable a button in jquery

// disable button using prop.

$(".button").click(function(){
  // disable button
  $(this).prop('disabled', true);

  // do something

  // below code enables button clicking after two seconds.
  setTimeout(() => {
    // enable button
  	$(this).prop('disabled', false);
  }, 2000);
});
Comment

how to disable button in jquery

$("#button").attr("disabled", true);
//---------------------OR--------------------
jQuery("#button").attr("disabled", true);
// use jQuery instead of $ to avoid conflict with other JS libraies.
Comment

PREVIOUS NEXT
Code Example
Javascript :: disable button js 
Javascript :: node js check if called from module 
Javascript :: match the pattern in the input with javascript 
Javascript :: angular router outlet 
Javascript :: how to import svg in react 
Javascript :: discord js lockdown command 
Javascript :: check type of variable in javascript 
Javascript :: import react 
Javascript :: html2canvas reduce image size 
Javascript :: how to iterate array in javascript 
Javascript :: how to loop through something in node.js 
Javascript :: json decode android 
Javascript :: enviar formulario por ajax 
Javascript :: base href 
Javascript :: html to pdf javascript 
Javascript :: check which is dubicate in object of array 
Javascript :: converting object to an array in javascript 
Javascript :: remove letter until vowel javascript 
Javascript :: how to get variable value outside function in javascript 
Javascript :: react-stripe-checkout 
Javascript :: anagram program in javascript 
Javascript :: javascriopt initialize 2d array with size 
Javascript :: check if a key exists in an object javascript 
Javascript :: react native build android 
Javascript :: ternary operator javascript 
Javascript :: JS two numbers in array whose sum equals a given number 
Javascript :: regex e-mail 
Javascript :: rotate array by d elements javascript 
Javascript :: js settimeout wait element 
Javascript :: liquid object 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =