In order to support drag and drop in HTML5, you will require at least one element to accept draggable elements. Although there is a dropzone attribute that you could use, as described in the section “Introducing Drag and Drop in HTML5,” it is not currently supported by any HTML5 web browsers. Instead, you can assign a dropzone CSS class to one or more elements and then use jQuery to add the event listeners, as shown in the preceding section, “Specify Objects to Drag”:

<element class='dropzone'>...</element>

Note that you do not actually need a CSS rule with the name dropzone in order to use it as a CSS class. Because jQuery’s selector will match all elements that identify themselves with the dropzone class, this is more ...

Get HTML5: Your visual blueprint™ for designing rich web pages and applications now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.