什么是拖放最好的轻量级解决方案? [英] What are the best light-weight solutions for Drag and Drop?

查看:118
本文介绍了什么是拖放最好的轻量级解决方案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我喜欢和使用jQuery相当多,但我希望找到一个特殊项目的替代解决方案。

I love and use jQuery quite a lot, but I am hoping to find an alternate solution for a special project.

我正在创建一个书签,将与我的应用程序允许用户输入信息更快。目前我的应用程序中最大的痛苦之一是上传图像。用户(理解)讨厌以有组织的方式将图像下载到他们的计算机,然后将其上传到应用程序。

I am creating a bookmarklet which will interface with my application to allow users to enter information much quicker. One of the greatest pains in my application at the moment is uploading images. Users (understandly) hate the process of downloading images to their computers in an organized fashion, and then uploading them to the app.

我想要的书签要做的是加载在一个小div重叠,其中有几个小控件,包括一个允许用户将图像从当前页面拖放到控件中的控件。然后,该脚本将收集这些img标签的URI,并将其与表单一起提交给应用程序,然后它们将自动从服务器下载到应用程序中。

What I would love the bookmarklet to do is load in a small div overlay with a couple small controls in it, including one which would allow the user to drag and drop images from the current page into the control. The script would then collect the URI's of those img tags and submit them along with the form to the app, and then they would automatically be downloaded by the server into the app.

所以,为了这个任务,每当你点击这个bookmarklet时,都会将jQuery和jQuery UI加载到页面中,似乎是一个非常笨重的方法。

So, for this task, loading jQuery and jQuery UI into the page every time you click the bookmarklet seems like a very heavy-handed approach.

推荐一款漂亮,重量轻的JavaScript工具包来处理拖放功能,没有别的什么?

我很高兴看到新的 DragDealer 工具,这看起来很棒,就在今天在ajaxian上,但似乎它被构建为只处理拖动而不是 (即不是目标)

I was excited to read about the new DragDealer tool, which looks awesome, just today on ajaxian but it seems that it is built to handle only dragging and not "dropping" (ie, not targets)

推荐答案

我认为一个库可能不是最好的解决方案,只是尝试搜索一个函数/独立插件/小部件,只为您提供此功能,例如

I think a library might not be the best solution and just try searching for a function/stand alone plugin/widget that just delivers this functionality for you such as

  • http://www.webreference.com/programming/javascript/mk/column2/
  • http://luke.breuer.com/tutorial/javascript-drag-and-drop-tutorial.aspx
  • http://tool-man.org/examples/dragging.html

这篇关于什么是拖放最好的轻量级解决方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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