Jquery 如何删除。可从元素中选择

Jquery 如何删除。可从元素中选择,jquery,jquery-ui-selectable,Jquery,Jquery Ui Selectable,我正在我的一个表上使用jquery Selective,我希望在某些情况下从元素中删除.selectable 我找到了一个可行的解决方案,那就是添加禁用的true或false选项,并在if和else语句中使用它 $( ".standard-table").selectable({ filter: "tr", disabled: false, scrollSnapX: 5, // When the selection is t

我正在我的一个表上使用jquery Selective,我希望在某些情况下从元素中删除
.selectable

我找到了一个可行的解决方案,那就是添加禁用的true或false选项,并在if和else语句中使用它

$( ".standard-table").selectable({
            filter: "tr",
            disabled: false,
            scrollSnapX: 5, // When the selection is that pixels near to the top/bottom edges, start to scroll
            scrollSnapY: 5, // When the selection is that pixels near to the side edges, start to scroll
            scrollAmount: 25, // In pixels
            scrollIntervalTime: 100 // In milliseconds
});
然而,有一个缺点是,我希望jQuerySelective消失,这样我就可以用其他方式与表交互

当我禁用Jquery selectable时,它不会像我希望的那样选择表,但它会阻止我在禁用时触发表上的任何事件

我想不用添加禁用的选项,我可以在喜欢的时候从
.standard table
中删除
.selective
,然后在喜欢的时候放回去


这可能吗?或者有其他解决方法吗?

您可以使用以下选项删除:


明亮的非常感谢。我不敢相信我在文档中也漏掉了。
$( ".standard-table" ).selectable( "destroy" );