Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery UI selectable - making multiple select default

I need to make multiple selection available by default, so the user doesn't have to hold ctrl. Would appreciate some help with this, thanks.

like image 475
Lars Thorén Avatar asked Mar 13 '11 07:03

Lars Thorén


2 Answers

$("#selectable").selectable();
    $("#selectable").on("selectablestart", function (event, ui) {
        event.originalEvent.ctrlKey = true;
    });
like image 66
Przemysław Banaszek Avatar answered Sep 20 '22 22:09

Przemysław Banaszek


If you want to use selectable , you might want to use bind meta key with mousedown event. There's already a debate going down here , i just found when i googled.

like image 21
add9 Avatar answered Sep 23 '22 22:09

add9