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

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 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 convert string to lowercase 
Javascript :: check if click is inside div javascript 
Javascript :: javascript to detect browser 
Javascript :: random int between two numbers javascript 
Javascript :: check directory exist node 
Javascript :: implode js 
Javascript :: js remove last character from string 
Javascript :: allow paste js code 
Javascript :: how to reload page on button click in javascript 
Javascript :: return current date in javascript 
Javascript :: js loop through array backwards 
Javascript :: Source file requires different compiler version (current compiler is 0.8.4+commit.c7e474f2.Emscripten.clang) - note that nightly builds are considered to be strictly less than the released version 
Javascript :: Consider using the "jsdom" test environment. 
Javascript :: how to wait 1 second in javascript 
Javascript :: electronjs start with devtools enabled 
Javascript :: google dino hack 
Javascript :: number to char js 
Javascript :: ajax beforesend 
Javascript :: js get query param 
Javascript :: jquery check if empty object 
Javascript :: settimeout jquery 
Javascript :: get attribute of selected option jquery 
Javascript :: jquery remove string from string 
Javascript :: boxshadow in react native 
Javascript :: react.js installation 
Javascript :: serialize and send form data jquery ajax 
Javascript :: Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps 
Javascript :: jquery onlcick css change 
Javascript :: Remove line breaks with JavaScript 
Javascript :: trigger change select element jquery 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =