I am having some difficulty with the following and need a bit of guidance in how this can be achieved (simply).
Using jQuery, how can I drag one object into a container, register it for events, and leave the original dragged item in place.
This is very difficult to explain, so the best I can give is a site with a working example: enter link description here
I am familiar with using draggable, and droppable, and registering an original container, however on drop, the dragged object is moved from it's origin. Basically, I wish to achieve this >>
- Have an unordered list of images that are all registered with draggable.
- Have a container that is registered as droppable.
- On drag&drop action of one of the images to the container, detect collision, and drop+render some html (for demonstration purposes, you can show how to do this with any image, and the dropped result could be an link on the page.
- During this process, the image must not be moved from the unordered list.
- Register the target html with events (for demonstration purposes, we can capture the onclick event for the newly inserted html ).
The drag & drop bit is the easy part. The difficulty I am having is in 3 parts :
- Keep the original item in it's original location after drop.
- Do not drop a clone of the original item -- use custom html instead.
- Setup the dropped code to handle new events that are unique to that block of code.
Thanks in advance.