I’m creating somewhat of a map editor, I’d like to be able to click on an available image from the sidebar and it appears under the cursor and follows the mouse icon, so basically dragging the image, but I’d like the original image to stay put.
How would I achieve this in jQuery (preferably)?
Try this one using jQuery UI:
HTML:
Script:
Here I also create the fiddle http://jsfiddle.net/aanred/b3QFN/. You can also read the documentation here http://jqueryui.com/draggable/.