我正在使用jQuery UI的可排序功能。这在浏览器中运行良好。但在iPad等触摸设备上,它无法正常工作。以下是我使用的代码:
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script src="js/jquery.ui.touch-punch.js"></script>
<script>
$(function() {
$( ".documents" ).sortable();
$( ".documents" ).disableSelection();
});
我的HTML代码是:
<div id="bodyContainer">
<ul class="documents">
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
</div>
请尽快告知我解决方案。先谢谢了。