Return to Snippet

Revision: 276
at July 8, 2006 11:56 by walepinski


Initial Code
// 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;
	});
}

Initial URL


Initial Description
Select all checkbox in the specific context.
Need jQuery Framework : http://jquery.com/

Initial Title
[ jQuery ] Checkbox Controller

Initial Tags
jquery

Initial Language
JavaScript