Skip to content

Instantly share code, notes, and snippets.

Zergius Eggstream zergius-eggstream

Block or report user

Report or block zergius-eggstream

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
zergius-eggstream / shift-selectable.js
Created Mar 13, 2017
jQuery plugin for shift + click to select multiple checkboxes ( modified for live collections support)
View shift-selectable.js
// usage: $('.container').shiftSelectable() to select all checkboxes in container $('.cont')
// or $('.container').shiftSelectable({items: '.shift-selectable'}) to select only checkboxes with shift-selectable class
$.fn.shiftSelectable = function(config) {
config = $.extend({
items: 'input[type="checkbox"]'
}, config);
var $container = this;
var lastChecked;
$container.on('click', config.items, function(evt) {
You can’t perform that action at this time.