What is disableSelection used for in jQuery UI?

前端 未结 3 1410
余生分开走
余生分开走 2021-02-04 23:00

Can someone help me understand why is this useful and when to use it?

$( \"#sortable\" ).disableSelection();
3条回答
  •  情书的邮戳
    2021-02-04 23:33

    It's useful if you want to make text unselectable. If, for instance, you want to make drag-and-drop elements with text on, it'd be annoying to the user if the text on the box accidentally would get selected when trying to drag the box.

提交回复
热议问题