Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

jquery add disabled to button

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

jquery button remove disabled attribute

//for a class
$('.inputDisabled').prop("disabled", false);
//for a ID
$('#inputDisabled').prop("disabled", false);
Comment

jquery remove disabled property from button

 $('#edit').click(function(){ // click to
            $('.inputDisabled').attr('disabled',false); // removing disabled in this class
 });
Comment

jquery disable button

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

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

disable all buttons jquery

$('button').removeAttr('disabled')
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 remove disabled property from button

$("#edit").click(function(event){
   event.preventDefault();
   $('.inputDisabled').prop("disabled", false); // Element(s) are now enabled.
});
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

disable button using 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 :: javascript regex extract url from string 
Javascript :: naming branches git 
Javascript :: js check if function exists 
Javascript :: iterate over map key value javascript 
Javascript :: move dom element to another parent 
Javascript :: generate a sequence numbers between a range javascript 
Javascript :: search content in js 
Javascript :: document.write multiple lines 
Javascript :: javascript falsy values 
Javascript :: ajax load spesific element from another page 
Javascript :: react native width auto 
Javascript :: how to install nodejs on arch linux 
Javascript :: toggle class javascript and jquery 
Javascript :: bootstrap carousel click event next previous 
Javascript :: guid generator node 
Javascript :: angular maxlength directive input type number 
Javascript :: how to use custom stylesheets express node 
Javascript :: use regex to get urls from string 
Javascript :: jq object to dom object convert 
Javascript :: javascript remove event listener 
Javascript :: how to check if radio button is checked javascript 
Javascript :: js toggle boolean 
Javascript :: react router history push parameter 
Javascript :: react native callback function uses default state value 
Javascript :: mongoose generate objectid 
Javascript :: convert array to object in javascript 
Javascript :: loopback model count 
Javascript :: jquery addeventlistener 
Javascript :: react bootstrap card 
Javascript :: splidejs pause 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =