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.
所以我知道如果一个元素是可放置的,那么你可以设置一个选项,如:
drop: function(){ alert('something was dropped'); }
但是我该如何设置它,以便我可以引用放置在它上面的元素,所以我可以做这样的事情:
drop: function(){ alert(elementId + ' was dropped'); }
谢谢。
drop: function(event, ui) { alert($(ui).attr("id") + " was dropped"); }