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 click event jquery

$("#navigation ul li").unbind("click");
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 :: ajax load document ready 
Javascript :: copy to clipboard angular 
Javascript :: regex email pattern 
Javascript :: access to model from js 
Javascript :: dom element get attribute 
Javascript :: logout user firebase 
Javascript :: alpine in laravel mix 
Javascript :: Unable to resolve module react-native-permissions 
Javascript :: js querySelectorAll map sample 
Javascript :: console.time 
Javascript :: click outside react component 
Javascript :: width and height in js 
Javascript :: javascript take first element of array 
Javascript :: angular disabled condition based 
Javascript :: add date in javascript 
Javascript :: javascript array function 
Javascript :: how to add background image in mui 
Javascript :: javascript input checkbox name 
Javascript :: regex not contain 
Javascript :: javascript array delete by index 
Javascript :: cancel button in react js 
Javascript :: how to use ctx on canvas js 
Javascript :: find is not a function javascript 
Javascript :: aos animation angular 
Javascript :: link button material ui 
Javascript :: ref css in jsp 
Javascript :: javascript regex check phone number 
Javascript :: new line in react js 
Javascript :: how to capitalize first letter javascript 
Javascript :: javascript window size 
ADD CONTENT
Topic
Content
Source link
Name
7+5 =