Posts

Showing posts with the label shift select table

Multi-select with shift on HTML table

Well I was looking into adding a shift select on a checkbox table. After performing a quick search I found a jquery plugin . This was a great start, but I found it would not unselect successfully. I made some minor modifications and now it appears to work in IE9 and FF... (function($){   function toggleSelected(element, shouldSelect) {     $(element).attr("checked", shouldSelect);     if(shouldSelect){         $(element).parents("tr").addClass("selected");     } else {         $(element).parents("tr").removeClass("selected");     }   }     $.fn.shiftSelectTable = function(){     var $table = $(this);         $table.find(":checkbox").click(function(event){       var last = $table.data("jquery-shift-select-table.last");       $table.data("j...