jQuery Plugin For Select/Deselect All And Invert Selection - selectToDo.js
File Size: | 5.12 KB |
---|---|
Views Total: | 1576 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |
selectToDo.js is a really simple jQuery plugin that allows to select and/or deselect a group of checkbox inputs with 'Invert Selection' support.
How to use it:
1. Create the select all, deselect all and invert selection buttons for your checkboxes:
<input type="button" value="Select All" id="selectAll"> <input type="button" value="Select None" id="selectNone"> <input type="button" value="Select Invert" id="selectInv">
2. Load the jQuery selectToDo.js script after jQuery plugin.
<script src="//code.jquery.com/jquery.min.js"></script> <script src="jquery.selectToDo.js"></script>
3. Active the plugin by adding the following JS snippets at the bottom of the webpage.
var selectToDo = $("input[type='checkbox']").selectToDo({ "selectAllButton" : $("#selectAll"), "selectNoneButton" : $("#selectNone"), "selectInvertButton" : $("#selectInv") });
4. Get the current selected values:
selectToDo.result()
This awesome jQuery plugin is developed by elrichuang. For more Advanced Usages, please check the demo page or visit the official website.