// context = id of elements which contains checkboxes // controller = DOMelement of ckeckbox controller function checkall(context, controller){ $("#"+context).find("input[@type$='checkbox']").not(controller).each(function(){ // verify the state of checkbox controller and pass the state to others checkboxes this.checked = $(controller).checked; }); } //javascript/2496