Use Shift Selection For Checkboxes - jQuery Tshift

Use Shift Selection For Checkboxes - jQuery Tshift
File Size: 56.2 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Tshift is a simple jQuery plugin that allows you to select multiple checkboxes with SHIFT key.

How to use it:

1.  Include jQuery library and Tshift.js

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="src/jquery.tshift.min.js"></script>

2. Markup

<div id="checkboxes">
<fieldset>
<legend>Select</legend>
<input type="checkbox" name="number[]" value="1" /> 1<br />
<input type="checkbox" name="number[]" value="2" /> 2<br />
<input type="checkbox" name="number[]" value="3" /> 3<br />
<input type="checkbox" name="number[]" value="4" /> 4<br />
<input type="checkbox" name="number[]" value="5" /> 5<br />
<input type="checkbox" name="number[]" value="6" /> 6<br />
<input type="checkbox" name="number[]" value="7" /> 7<br />
<input type="checkbox" name="number[]" value="8" /> 8<br />
<input type="checkbox" name="number[]" value="9" /> 9<br />
<input type="checkbox" name="number[]" value="10"/> 10<br />
</fieldset>    
</div>

3. Call the plugin

<script>
$(function() {
    $('#checkboxes').tshift();
});
</script>

About Author:

Author: Alfredo

Website: https://github.com/berumen/tShift

Change log:

v1.2.3 (2014-05-31)

  • supports jQuery 1.9+

This awesome jQuery plugin is developed by berumen. For more Advanced Usages, please check the demo page or visit the official website.