O'Reilly logo

HTML5: Your visual blueprint™ for designing rich web pages and applications by Adam McDaniel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

INTRODUCING DRAG AND DROP IN HTML5

The mouse has always been one of the easiest user interface tools to learn how to use; you just point and click. Unfortunately, some mouse interaction also has been one of the hardest features to support directly in JavaScript, such as identifying what the user is pointing at and which button was clicked. For a long time, websites were forced to instruct the browser as to what the user could click, where it was, and what it did. Anything that did not involve a single left click was overly complicated and inconsistent across browsers.

Eventually, direct mouse detection and control was offered in 2000 with the W3C DOM Level 2 MouseEvent object, but not all browsers adopted it properly. This led to cross-browser ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required