Created
July 28, 2022 18:02
-
-
Save drewbrokke/516fdf70d7ec41177b3f210fec349ff0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.querySelectorAll('input[type="checkbox"][value="indeterminate"]') .forEach(function(checkbox) { | |
checkbox.indeterminate = true; | |
let onchangeHandler = function() { | |
checkbox.value = ''; | |
checkbox.removeEventListener('change', onchangeHandler); | |
} | |
checkbox.addEventListener('change', onchangeHandler); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment