Javascript 如何使用sortable.js拖放选择列表(下拉列表)
我使用它拖放html元素。我无法拖动完整的下拉列表,因为它是“选择->选项” 我有这个选择标签Javascript 如何使用sortable.js拖放选择列表(下拉列表),javascript,sortablejs,Javascript,Sortablejs,我使用它拖放html元素。我无法拖动完整的下拉列表,因为它是“选择->选项” 我有这个选择标签 <div class="cust-item-group"> <select id="ddl" class="cust-item item-element form-control"> <option class="cust-item item-eleme
<div class="cust-item-group">
<select id="ddl" class="cust-item item-element form-control">
<option class="cust-item item-element">option</option>
<option class="cust-item item-element">option</option>
<option class="cust-item item-element">option</option>
</select>
</div>
<div class="container-fluid ec-wrapper">
<br />
</div>
我需要拖放整个带有子节点的select,但我无法做到这一点。我甚至不能拖动这个标签。但我可以拖动其他元素。我正在尝试将select从我的from div拖动到我的to div
我是div的
我要去潜水
分享你的代码,请用一堆类似物替换我的代码。。谢谢你的回复。。
var items = $(".cust-item-group");
for (var i = 0; i < items.length; i++) {
new Sortable(items[i], {
group: {
name: 'shared',
pull: 'clone',
put: false,
},
filter: '.el-title',
animation: 150,
sort: false,
});
}
var items2 = $(".ec-wrapper");
for (var i = 0; i < items2.length; i++) {
new Sortable(items2[i], {
group: {
name: 'shared',
},
animation: 150
});
}