Skip to content

Instantly share code, notes, and snippets.

View johndyer's full-sized avatar

John Dyer johndyer

View GitHub Profile
@johndyer
johndyer / check_all.js
Created June 1, 2011 21:24 — forked from nathansmith/check_all.js
Used to check all checkboxes in a page.
(function(d) {
var input = d.getElementsByTagName('input'),
i = input.length;
while (i--) {
if (input[i].type === 'checkbox') {
input[i].setAttribute('checked', 'checked');
}
}
})(this.document);