Question

Im currently implementing a selectable list based off the jquery selectable grid demo at http://jqueryui.com/demos/selectable/#display-grid

My question is, is there a way to have it so when you click on a new grid panel it selects it and doesnt deselect the current selection (disregard the ctl+mouse click logic). i.e. Panels can only be "de-selected" by clicking on them?

Thanks

Was it helpful?

Solution

This should do the trick:

$(function() {
    $("#selectable").bind("mousedown", function(e) {
        e.metaKey = true;
    }).selectable();
});
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top