Last active
October 9, 2015 20:26
-
-
Save atelic/e954706cfef4ee1ae5b2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Checks or unchecks all checkboxes on a page | |
var setAllBoxes = function(value) { | |
var boxes = document.querySelectorAll('input[type="checkbox"]'); | |
for(var i = 0; i < boxes.length; i++) { | |
boxes[i].checked = value; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment