Skip to content

Instantly share code, notes, and snippets.

@denisoster
Created May 5, 2020 08:07
Show Gist options
  • Save denisoster/8dea79ec9d652e03b28adbee833204b3 to your computer and use it in GitHub Desktop.
Save denisoster/8dea79ec9d652e03b28adbee833204b3 to your computer and use it in GitHub Desktop.
'arrow function syntax (=>)' is only available in ES6 (use esnext option).
function disabledCheckBoxes(elements) {
document.querySelectorAll(elements).forEach(element => {
element.setAttribute("disabled", "disabled");
});
}
function enabledCheckBoxes(elements) {
document.querySelectorAll(elements).forEach(element => {
element.removeAttribute("disabled");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment