jquery sortable 克隆问题
jquery吧
全部回复
仅看楼主
level 1
lerywi 楼主
$(function(){
//引用主页面中的所有块
var els = ['
#header1','#
header2','
#header', '#
content', '
#sidebar', '#
footer', '#trashcan'];
var $els = $(els.toString());
$els.sortable(
{
items: '> dl', //拖拽对象
helper: 'clone',//触发克隆的函数
handle: 'dt', //可触发该事件的对象
cursor: 'move', //鼠标样式
opacity: 0.8, //拖拽时透明
appendTo: 'body',
connectWith: els,
start: function(e,ui) {
var clones=$(this).sortable('option','helper');
ui.helper.css("width",ui.item.width());
},
change: sortableChange,
update: sortableUpdate //用于回收站
});
});
这段代码我用来做拖动排序的,其中helper:'clone'是表示拖动是显示一个辅助的元素,相当于克隆的元素,但是为什么我的就没有这个效果啊
2011年08月03日 03点08分 1
level 1
楼主解决了这问题了吗,我也遇到了
2017年09月11日 03点09分 2
1