So my friend needed a way to un-check all the check boxes on a single web page (had 700+ to un-check) so obviously this would’ve taken an insane amount of time to do by hand (or by mouse.) So I came up with this little bit of code to paste into your Chrome, Firefox, or insert other JQuery supporting browser name here’s Developer Console. All you simply need to do is copy and paste and hit enter to execute the mass check/un-check functionality 🙂

CHECK ALL

(function() {
var aa = document.querySelectorAll(“input[type=checkbox]”);
for (var i = 0; i < aa.length; i++){
aa[i].checked = true;
}
})()

UN-CHECK ALL

(function() {
var aa = document.querySelectorAll(“input[type=checkbox]”);
for (var i = 0; i < aa.length; i++){
aa[i].checked = false;
}
})()

Categories: Uncategorized

Leave a Reply

Your email address will not be published. Required fields are marked *