【发布时间】:2012-05-28 13:32:06
【问题描述】:
我正在使用 jQuery UI 来制作一个范围滑块。该插件在 html 中创建一个文本输入以显示范围值。问题是文本区域在触摸屏设备上是可选的,即使它当时不可编辑。
如何阻止文本输入变为可选状态?我尝试了以下 CSS:
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
user-select: none;
还有下面的jQuery:
$("#amount, #amount2").mousedown(function (evt) {
evt.stopImmediatePropagation();
return false;
});
$("#amount, #amount2").disableSelection();
【问题讨论】:
标签: jquery jquery-ui mobile input touchscreen