Skip to content

Instantly share code, notes, and snippets.

@beacrea
Last active December 11, 2015 20:09
Show Gist options
  • Save beacrea/4653360 to your computer and use it in GitHub Desktop.
Save beacrea/4653360 to your computer and use it in GitHub Desktop.
A way to go through a list of items and mark all items.
var check = document.querySelectorAll('[type="checkbox"]');
var i = check.length;
while(i--){
if(check[i].disabled == true) continue;
check[i].checked = true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment