Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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

jquery disable button

function disable(i){
    $("#rbutton_"+i).prop("disabled",true);
}
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 :: js round up decimal 
Javascript :: how to set header in angular 8post 
Javascript :: nodejs check directory exist or not 
Javascript :: jquery loop through class inside the div 
Javascript :: node check if not connected to internet 
Javascript :: how do you remove a remove element from array in javascript 
Javascript :: percentage width react native 
Javascript :: addAtribute 
Javascript :: @react-navigation/native unmount inactive 
Javascript :: Twilio room does not disconnect / Webcam LED remains on 
Javascript :: how to detect js module was required 
Javascript :: react execute code after set 
Javascript :: update replit node 
Javascript :: Moment js get first and last day of current month 
Javascript :: js inner text 
Javascript :: javascript loop with delay 
Javascript :: server error payload too large base64 image 
Javascript :: formik provider 
Javascript :: casperjs exit 
Javascript :: how to get the contract address from the contract instance web3js 
Javascript :: button disabled angular 
Javascript :: react-dom.development.js:86 Warning: ReactDOM.render is no longer supported in React 18. Use createRoot instead. 
Javascript :: vue call method after delay 
Javascript :: vscode ejs formatter 
Javascript :: htmlparser2 extract text from html 
Javascript :: hover vanilla javascript 
Javascript :: javascript get clipboard contents 
Javascript :: body-parser deprecated bodyParser 
Javascript :: bootstrap tabs click event jquery 
Javascript :: redis json get multiple paths 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =