In a web application I am making I want to create the same effect that GMail has for dragging and dropping labels and conversations.
Basically I want to be able to make an ondrag function that attaches a "new" html element to the cursor, and upon releasing it over certain elements I want to execute my given functionality that is aware of both the dragged element and the element over which the drop occured.
I don't want to move any elements around. I want to make a function that let's the original elements stay in place and only react to the draggi开发者_运维技巧ng of some new element.
How can this be done?
you mean something like this : http://www.finrik.at/temp/drag_drop/index.html here is the how to. and you'll need jQuery plgin (www.jquery.com)
精彩评论