O'Reilly logo

The Dojo Toolkit: Visual QuickStart Guide by Steven Holzner

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

Chapter 7. Dragging and Dropping

Dojo has built-in support for one of the most elegant Web page features: drag and drop. You might think that letting users drag and drop elements in your Web pages should be simple, but you’ll find that it isn’t if you write all the code yourself. After accounting for cross-browser issues, you’ll be writing about five single-spaced pages of JavaScript code.

Dojo, the cross-platform JavaScript toolkit, to the rescue! Dojo has lots of drag-and-drop capability built in, and all you need to do is put it to work—which can be as easy as making the dojoType value of an element dojo.dnd.Moveable (the dnd stands for drag and drop).

In this chapter, you’ll see how to add drag-and-drop capability to your Web pages, from supporting ...

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