Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
jquery ui 的 .draggable() 交互声明它“在任何 DOM 元素上启用可拖动功能”;但是,我不能让它为以下工作:
<button id="btnWTF">WTF</button>
和
$(document).ready(function() { $("#btnWTF").draggable(); });
有什么想法吗?
试试这个..这会取消按钮的默认点击事件。
$('#btnWTF').draggable({cancel:false});