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

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

how to make button disabled in jquery before send


$('#btnSubmit').attr("disabled", false);	
or
$('#btnSubmit').removeAttr("disabled");
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 :: list all node processes 
Javascript :: mac address validation regex 
Javascript :: remove non letters from a string javascript 
Javascript :: clean gradle react android 
Javascript :: jquery input name value 
Javascript :: jquery redirect 
Javascript :: setinterval jquery 
Javascript :: Error: Node Sass version 5.0.0 is incompatible with ^4.0.0. 
Javascript :: Basic JavaScript: Use Recursion to Create a Countdown 
Javascript :: remove attribute in jquery 
Javascript :: javascript window.location new tab 
Javascript :: jquery reload page 
Javascript :: js get base url 
Javascript :: 2x speed youtube 
Javascript :: react 18 createroot 
Javascript :: select2 in modal not work 
Javascript :: how to reload page on button click in javascript 
Javascript :: Node Sass could not find a binding for your current environment: Linux 64-bit with Node.js 10.x 
Javascript :: javascript element by class 
Javascript :: Uncaught TypeError: firebase_app__WEBPACK_IMPORTED_MODULE_4__.default.storage is not a function 
Javascript :: chartjs bar chart hover color 
Javascript :: jquery pause n seconds 
Javascript :: swiper.js cdn 
Javascript :: update version of node gyp 
Javascript :: how to use lodash in angular 
Javascript :: format amount in javascript 
Javascript :: javascript replace space by underscore 
Javascript :: page reload timeout 
Javascript :: react.js installation 
Javascript :: use application/x-www-form-urlencoded in javascript 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =