2
這似乎是它應該是一個簡單的任務,但我是一個小白儘可能去jQuery的,所以這就是我正在尋找:jQuery的ID爲拖
我有這樣的事情:
<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?
}
謝謝。我忘了Javascript有'this' –