提问人:Denis 提问时间:3/1/2016 更新时间:3/1/2016 访问量:126
添加新 div 时 jquery 可排序对象不起作用
jquery sortable not working when adding new div
问:
对不起,我有很多问题,而不是贡献答案
因为我不懂那么多种类的网络编程
我尝试了jquery sortable,我真的不知道jquery sortable是如何工作的
我的代码以前一直在工作,直到我在上面添加新元素,如下所示:<div class="grid_12">
<div id="list">
<div class="parent ui-sortable">
<div class="grid_12">
<h2 id="arrayorder_1">Home</h2>
</div>
<div class="grid_12">
<h2 id="arrayorder_2">Profil</h2>
</div>
</div>
</div>
和消息:
警告:为 foreach() 提供的参数无效
Sortable 不产生数组,这是我的 jQuery 可排序脚本
$(function() {
// uiSort utama parent
$('#list .parent').sortable({
axis: 'y',
opacity: 0.8,
placeholder: 'placeholder',
cursor: 'move',
update: function() {
var order = $(this).sortable("serialize") + '&update=update';
$.post("updateList.php", order, function(theResponse){
alert(theResponse);
});
}
});
});
请回答这个 foo..谢谢^^'
答: 暂无答案
评论