Multiple Item Selection By Pressing Ctrl Button
Currently my function looks like that http://jsfiddle.net/tt13/5CxPr/13/ as you see, now when I click one by one multiple rows, it will make them selected. What I want to do is,
Solution 1:
Try this:
$(".subject").live('click',function(event) {
event.preventDefault();
if(event.ctrlKey) {
$(this).toggleClass('selected');
} else {
$(".subject").removeClass("selected");
$(this).addClass("selected");
}
});
Post a Comment for "Multiple Item Selection By Pressing Ctrl Button"