Tip 34Getting It All Sorted Out with Drag and Drop

Since the introduction of the mouse, we’ve been trained to drag elements around on the screen. For many years, we’ve relied on JavaScript and Document Object Model solutions to bring drag-and-drop capabilities to the browser. The HTML5 specification gives us a native and more performant way to make elements draggable, although the implementation is a bit complex.

AwesomeCo’s management team has an idea for a piece of software where users can enter ideas on virtual notecards and then reorder them on the screen. We get to build the basic user interface for this, and it’s is a great opportunity for us to experiment with native Drag and Drop. When we’re done, we’ll have something that looks like ...

Get HTML5 and CSS3, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.