How to implement a drag and swap effect in CSS and JS [closed]
Right now, say I have 4 DIV elements on the page, what I want to implement is drag a one DIV and move to other DIV then they can swap position just like IPHONE, when you hold the icon for a little while, all the icons turn into position edit mode, you can move icon around the screen and located to certain grid position and according icon can swap with it.
Could anyone show me an example for this?
Jquery UI makes this trivial:
The link also shows an example of how to use it.