0
我嘗試以下操作:jQuery的拖放:從李更改元素的div和背部
第1階段:
- 變化從李到DIV上滴在拖動元素#canvas
- 移動拖動元件內部#canvas
階段2:
- 變化從DIV到利上下降#imagelist
- 可拖動元件移動拖動元件內部#imagelist
Js:
$(function() {
var $imagelist = $("#imagelist");
var $canvas = $("#canvas");
$('li', $imagelist).draggable();
$canvas.droppable({
drop: function (event, ui) {}
});
$imagelist.droppable({
drop: function (event, ui) {}
});
});
HTML:
<div id="listwrapper">
<ul id="imagelist">
<li class="draggable>Content that should not be lost on drag/drop</li>
<li class=" draggable>Content that should not be lost on drag/drop</li>
</ul>
</div>
<div id="canvas">
<div class="draggable">Content that should not be lost on drag/drop</div>
</div>
有人能幫助我嗎?