这看起来应该是一个简单的任务,但就jQuery来说我是个菜鸟,所以这就是我要找的东西:
我有这样的事情:
<div class=draggable id=thing1> some contents </div>
<div class=draggable id=thing2> some other contents </div>
.
.
.
<div class=draggable id=thingN> content </div>
使用此Javascript:
$(function() {
$(".draggable").draggable();
// from inside this block, how can I know the id of the thing I'm dragging?
}