Simple to check and uncheck checkboxes
Less file size and simple implementation
checkbox_select_all is jQuery dependent javascript for implementing 'select-all' functionality in more simple and effective way in your application.
- Basic Usage - Selecting/Unselecting multiple checkboxes.
- Multiple Seletions - Implementing more than one select-all functionalities in a page.
- Ajax Added Checkboxes - Implementing select-all functionality to new checkboxes added by an Ajax call.
- Show Selection/Count - Display selected checkboxes count or checkboxes remaining to select count or selected checkboxes count out of total checkboxes.
Call the function select_all() on main checkbox and add class 'selectable' to sub-checkboxes.
HTML example:
<input type="checkbox" id="selectAll">All Items</input>
<input type="checkbox" class="selectable">Item 1</input>
<input type="checkbox" class="selectable">Item 2</input>
<input type="checkbox" class="selectable">Item 3</input>
<script type="text/javascript">
$("#selectAll").select_all();
</script>
For more usage checkout Demo
- Fork it ( https://github.com/[my-github-username]/checkbox_select_all/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request