function checkboxAll(idNum) { $("input:checkbox").each(function(){ if(this.name=="config["+idNum+"]") $(this).click(); }); }