How to prevent multiple selection in jQuery UI Selectable plugin

前端 未结 10 1837
走了就别回头了
走了就别回头了 2020-12-30 00:13

I am using jQuery UI Selectable plugin. I want to select one item at a time. But jQuery UI Selectable plugin allows multiple selection by clicking/ dragging / holding CTRL

10条回答
  •  攒了一身酷
    2020-12-30 00:27

    There is no defined way. However, you could pass in a callback function for "Start" or "Selected" events, that cancels the selection if more than one element is selected.

提交回复
热议问题