同时拖动多个列表项 [英] dragging multiple list items simultaneously
本文介绍了同时拖动多个列表项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可排序
连接,允许将项目从一个列表拖动到另一个列表。 有没有一个简单的方法来拖动几个项目在同一时间 - 例如将项目#3,#4和#7从左到右移动?
解决方案
不在插件中。
您可以编写一些自定义代码将项目添加到选择中,然后一次移动多个。
喜欢:
$(li).bind(click,function(){
$(this).toggleClass sort-selected');
});
$(ul).bind(sortreceive,function(event,ui){
$('li.sorting-selected')。appendTo($(this)) ;
});
I have two lists connected with jQuery UI's sortable
, allowing to drag items from one list to another.
Is there a simple way to drag several items at the same time - e.g. to move items #3, #4 and #7 from left to right?
解决方案
Not in the plugin.
You can write some custom code to add items to a selection and then move multiple at once.
Like:
$( "li" ).bind( "click", function() {
$(this).toggleClass('sorting-selected');
});
$( "ul" ).bind( "sortreceive", function(event, ui) {
$('li.sorting-selected').appendTo($(this));
});
这篇关于同时拖动多个列表项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文