This package has been deprecated. Consider using simivar/vanillajs-checkall or github/check-all.

Options

option value default description
target (required) string null A string containing a selector expression for targeted checkboxes
uniform boolean false Whether or not UniformJS is used to style targeted checkboxes
icheck boolean false Whether or not iCheck is used to style targeted checkboxes
onAnyTargetChecked function function (count){} Callback which is fired when more then zero target elements are checked
onNoTargetChecked function function (){} Callback which is fired when no target elements are checked
onTargetClick function function (target){} Callback which is fired when target element is clicked
onElementClick function function (elem){} Callback which is fired when element is clicked

Examples

Basic usage

$( "#element" ).checkall({
	target: ".checkme"
});
						
<table>
	<tr>
		<th><input type="checkbox" id="element" /></th>
		<th>Column #1</th>
		<th>Column #2</th>
	</tr>
	<tr>
		<td><input type="checkbox" class="checkme" /></td>
		<td>Sample</td>
		<td>Sample</td>
	</tr>
	<tr>
		<td><input type="checkbox" class="checkme" /></td>
		<td>Sample</td>
		<td>Sample</td>
	</tr>
</table>
						
Column #1 Column #2
Sample Sample
Sample Sample

Uniform usage

Column #1 Column #2
Sample Sample
Sample Sample
$( "#element-uniform" ).checkall({
	target: ".checkme-uniform",
	uniform: true
});
						
<table>
	<tr>
		<th><input type="checkbox" id="element-uniform" /></th>
		<th>Column #1</th>
		<th>Column #2</th>
	</tr>
	<tr>
		<td><input type="checkbox" class="checkme-uniform" /></td>
		<td>Sample</td>
		<td>Sample</td>
	</tr>
	<tr>
		<td><input type="checkbox" class="checkme-uniform" /></td>
		<td>Sample</td>
		<td>Sample</td>
	</tr>
</table>
						

iCheck usage

$( "#element-icheck" ).checkall({
	target: ".checkme-icheck",
	icheck: true
});
						
<table>
	<tr>
		<th><input type="checkbox" id="element-icheck" /></th>
		<th>Column #1</th>
		<th>Column #2</th>
	</tr>
	<tr>
		<td><input type="checkbox" class="checkme-icheck" /></td>
		<td>Sample</td>
		<td>Sample</td>
	</tr>
	<tr>
		<td><input type="checkbox" class="checkme-icheck" /></td>
		<td>Sample</td>
		<td>Sample</td>
	</tr>
</table>
						
Column #1 Column #2
Sample Sample
Sample Sample

jQuery checkAll plugin is released under the MIT License. Feel free to use it in personal and commercial projects.