我正在构建一个包含面板上项目的页面,您可以将其放入列表中。
我该怎么做?
DEMO:https://jsfiddle.net/10kfrj0h/
HTML
<div class="left-panel">
<h3>left Panel</h3>
<div class="item-button">Table</div>
<div class="item-button">Car</div>
<div class="item-button">Tree</div>
<div class="item-button">Star</div>
<div class="item-button">Apple</div>
</div>
<div class="main-container sortable list">
<div class="list-item tree">Tree
<button type="button">delete</button>
</div>
<div class="list-item car">Car
<button type="button">delete</button>
</div>
<div class="list-item apple">Apple
<button type="button">delete</button>
</div>
<div class="list-item star">Star
<button type="button">delete</button>
</div>
<div class="list-item table">Table
<button type="button">delete</button>
</div>
</div>
JS
$('.sortable').sortable();