我有一個列表:拖放HTML5元素和JavaScript的問題
<ol class="list" id="drag-list">
<li data-itemid="01" draggable="true">
<span class="dragger"></span>
<span>01 - Lorem ipsum dolor sit amet.</span>
</li>
<li data-itemid="02" draggable="true">
<span class="dragger"></span>
<span>02 - Lorem ipsum dolor.</span>
</li>
<li data-itemid="03" draggable="true">
<span class="dragger"></span>
<span>03 - Lorem ipsum dolor sit amet, consectetur adipisicing elit.</span>
</li>
<li data-itemid="04" draggable="true">
<span class="dragger"></span>
<span>04 - Lorem ipsum dolor sit amet, consectetur adipisicing elit. Amet aliquam dolore totam, labore, voluptate delectus?</span>
</li>
<li data-itemid="05" draggable="true">
<span class="dragger"></span>
<span>05 - Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quo, soluta.</span>
</li>
</ol>
現在我需要重新安排使用HTML5拖拽李成員「東經下降。
我的問題是,在新位置釋放從未發生。我甚至想用這個例子,但它並沒有爲我工作:
https://html.spec.whatwg.org/multipage/dnd.html#event-drag
這裏,我離開你我的完整的工作(和錯誤的)代碼的jsfiddle。請你幫助我。
https://jsfiddle.net/junihh/vrg7oj2w/
https://jsfiddle.net/vrg7oj2w/1/ – Hackerman