jquery disable checkbox
$("#radiobutt input[type=radio]").each(function(i){
$(this).click(function () {
if(i==2) { //3rd radiobutton
$("#textbox1").attr("disabled", "disabled");
$("#checkbox1").attr("disabled", "disabled");
}
else {
$("#textbox1").removeAttr("disabled");
$("#checkbox1").removeAttr("disabled");
}
});
});$(function() {
enable_cb();
$("#group1").click(enable_cb);
});
function enable_cb() {
if (this.checked) {
$("input.group1").removeAttr("disabled");
} else {
$("input.group1").attr("disabled", true);
}
}
Also in JavaScript:
- how to get width of inline elements js
- axios set authorization header
- js find longest word in string function
- scroll down up js
- js get color of pixel
- jquery scroll to top of div animate
- javascript go to top of page
- Truthy and Falsy js
- how to get on click id in event
- nodemon compile typescript and execute js file
- using oximeter sensor with nodemcu esp8266
- convert arrow function to normal function javascript online
- reaction role by id discord.js
- get object with max value javascript
- encrypt js
- array shift javascript
- javascript trunc
- create react native app npm
- javvascript convert boolean to string
- how to empty form after submit react
- how to handle all error of all router in express
- react hook form rating material ui
- Programação web com Node e Express Beneficiando-se da stack JavaScript
- split string javascript