Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to disable onclick event in javascript

$("#id").on('click', function(){ //enables click event
    //do your thing here
});

$("#id").off('click'); //disables click event

// If you want to disable a div, use the following code:
$("#id").attr('disabled','disabled');
Comment

PREVIOUS NEXT
Code Example
Javascript :: convert nodes to array javascript 
Javascript :: javascript ajax load html into div 
Javascript :: jquery add multiple classes 
Javascript :: angular mat datepicker timezone 
Javascript :: uncheck a checkbox in javascript 
Javascript :: create array with number js 
Javascript :: Uncaught TypeError: $(...).DataTable is not a function 
Javascript :: sequelize dialect 
Javascript :: https://mongoosejs.com/docs/deprecations.html#findandmodify 
Javascript :: javascript operator double pipes 
Javascript :: how to reset node command prompt 
Javascript :: js remove seconds from time 
Javascript :: how to preview a pdf document in react 
Javascript :: Package path ./compat is not exported from 
Javascript :: react js console log not working 
Javascript :: javascript getminutes 2 digits 
Javascript :: lodash remove element from array 
Javascript :: string includes substring javascript 
Javascript :: mongodb add new field 
Javascript :: chrome.tabs.query( 
Javascript :: React import image with url 
Javascript :: react-phone-number-input retur message in react hook form 
Javascript :: convert date time to date function javascript 
Javascript :: foreach javascript 
Javascript :: create array javascript 
Javascript :: js iterate match indexes 
Javascript :: jquery remove multiple classes 
Javascript :: random numbers javascript 
Javascript :: json typicode 
Javascript :: rror: btoa is not defined 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =