Rameez Javed

Rameez Javed

  • NA
  • 395
  • 61.5k

can we disable enable controls of specific div on checkbox

Feb 3 2020 4:55 AM
Hi,
How we can disable enable controls of specific div on checkbox click/change,
I have three checkboxes and three divs, what I want to do is, on checkbox one checked enable div one controls (textboxes, select). so far I'm able to get the checkbox enable disable event like the code below
  1. $('#chkbxOne').change(function () {  
  2.             var c = this.checked ? 'T' : 'F';  
  3.             if (c == "T") {  
  4.                 
  5.                 alert("Enable");  
  6.             }  
  7.             if (c == "F") {  
  8.                 alert("Disable");  
  9.             }  
  10.             
  11.         });  
 where it alerts Enable, i want to enable all controls of this div,
same for other two divs

Answers (4)