【发布时间】:2011-04-09 04:51:00
【问题描述】:
我为拖放功能设置了以下设置:
const listDragOptions = {
handle: ".camera, .texter", // dragged by either camera or edit icon
//revert: true, // so dragged elements fall back to their original position,
revertDuration: 200, // the element goes back instantly, no need for effects on this one
snap: true, // snap to table cell edges
helper: "clone", // create a cloned element instead of moving the original one
drag: function(event, ui) {
// tell me which handle is being used!
}
}
基本上我需要知道用户点击了两个句柄“.camera,.texter”中的哪一个来实现拖拽功能。 这似乎很棘手。我在 API 中找不到任何东西,所以我真的很愿意接受任何肮脏的 hack。
感谢所有回答!
【问题讨论】:
标签: jquery user-interface drag-and-drop handle