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.
有没有办法改变触发 .draggable() 元素的事件?我想在 mousedown 事件而不是默认情况下开始拖动元素。
$('#init-canvas').dblclick(function() { $(this).draggable(); });
这就是你需要的。只有在第一次双击#init-canvas 之后,对象才可拖动。