最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - What are the best light-weight solutions for Drag and Drop? - Stack Overflow

programmeradmin0浏览0评论

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 puters in an organized fashion, and then uploading them to the app.

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.

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.

Can anyone remend a nice, light-weight, Javascript toolkit that handles drag and drop functionality and nothing else?

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" (i.e., not targets)

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 puters in an organized fashion, and then uploading them to the app.

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.

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.

Can anyone remend a nice, light-weight, Javascript toolkit that handles drag and drop functionality and nothing else?

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" (i.e., not targets)

Share Improve this question edited Nov 9, 2019 at 13:32 Brian Tompsett - 汤莱恩 5,89372 gold badges61 silver badges133 bronze badges asked Jun 22, 2010 at 22:24 Jordan SitkinJordan Sitkin 2,3433 gold badges26 silver badges35 bronze badges
Add a ment  | 

3 Answers 3

Reset to default 5

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./programming/javascript/mk/column2/
  • http://luke.breuer./tutorial/javascript-drag-and-drop-tutorial.aspx
  • http://tool-man/examples/dragging.html

REDIPS.drag JavaScript library covers only drag and drop (table content). Actually HTML table is used as layout and DIV elements can be moved across table cells. In a moment when dragged element is over table cell, table cell will be highlighted - if is enabled. Minimized and GZIPed, library is less then 10Kb. Here is link to the demo page:

http://www.redips/javascript/drag-and-drop-table-content/

I think one of the most popular ones you might like would be script.aculo.us found at

http://script.aculo.us/

发布评论

评论列表(0)

  1. 暂无评论