如何使用JavaScript或jQuery一次拖动多个元素? [英] How do I drag multiple elements at once with JavaScript or jQuery?

查看:147
本文介绍了如何使用JavaScript或jQuery一次拖动多个元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要通过jQuery拖动一组元素,就像我在Windows桌面上选择并拖动多个图标一样。



我发现了 threedubmedia的jQuery.event.drag



http://threedubmedia.com/code/event/drag/demo/multi

http://threedubmedia.com/code/event/drag#demos



我认为这个插件很棒。这是好的和受欢迎的图书馆吗?您是否知道使用它的网站或应用程序?



是否有其他库或插件拖动多个对象?



可以 jQuery UI 拖动多个对象吗?

解决方案

可拖动在jquery UI中



所有你必须做的是:

  $(selector).draggable(); //你完成了! 

参见示例: http://jsfiddle.net/maniator/zVZFq/


I want to be able to drag a group of elements with jQuery, like if I selected and dragged multiple icons on the Windows desktop.

I found the demo of threedubmedia's jQuery.event.drag:

http://threedubmedia.com/code/event/drag/demo/multi
http://threedubmedia.com/code/event/drag#demos

I think this plugin is great. Is this good and popular library? Do you know websites or applications which use it?

Are there any other libraries or plugins to drag multiple objects?

Can jQuery UI drag multiple objects?

解决方案

there is Draggable in the jquery UI

all you would have to do is:

$(selector).draggable(); // and you are done!

see example here: http://jsfiddle.net/maniator/zVZFq/

这篇关于如何使用JavaScript或jQuery一次拖动多个元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆