我想通过将列表项放在适当的选项卡上来移动元素。我使用 Simon Battersby 的解决方案,在列表中添加一个风格化的滚动条: Vertical Scrollbar Plugin using jQueryUI Slider。我使用以下解决方案来解决当您在屏幕上拖动时列表项是否可见: jQuery Draggable and overflow issue。
我的示例是http://jsfiddle.net/XmahV/
当可排序选项中的 helper="original" 时,以下代码有效:
drop: function( event, ui ) {
var $tabItem = $( this );
var $list = $( $tabItem.find( "a" ).attr( "href" ) ).find( ".sortable" );
**ui.draggable.hide( "slow", function() {
$(this).appendTo($list).show();//it does not work in my case
});**
}
但在我的情况下 helper="clone":
$( ".sortable" ).sortable({
connectWith: ".sortable",
//Need to drag across the entire window. Overflow issue.
appendTo: "body",
containment: "window",
scroll: false,
helper: "clone"
//End Overflow issue.
});
降低标签标题时,有人可以帮我移动列表项吗?或者有人可以告诉我,当您将项目转移到选项卡的标题时,如何从列表中删除项目?
谢谢