我有 2 个可排序的连接列表项,我想让该项目在更改列表容器时更改其属性(我的意思是将项目从第一个列表项拖放到第二个),这是我的代码:
$(".column").sortable({
connectWith: $(".column") ,
placeholder: 'widget-placeholder',
cursor: 'move' ,
helper: function (evt, ui) {
return $(ui).clone().appendTo('body').show();
},
dropOnEmpty: true,
zIndex: 10
});
$("#column2").droppable({
out: function( event, ui ) {
$(ui.item).attr("rel",'0');
},
over: function( event, ui ) {
$(ui.item).attr("rel",'1');
}
});