jQuery UI中的disableSelection是什么? [英] What is disableSelection used for in jQuery UI?

查看:104
本文介绍了jQuery UI中的disableSelection是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮助我了解为什么这样做有用以及何时使用吗?

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

$( "#sortable" ).disableSelection();

推荐答案

如果要使文本不可选择,这很有用.例如,如果您想在带有文本的情况下创建拖放元素,那么在尝试拖动框时如果框上的文本被意外选中会令用户感到烦恼.

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.

这篇关于jQuery UI中的disableSelection是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆