O'Reilly logo

YUI 2.8 Learning the Library by Dan Wellman, Daniel Barreiro

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

Implementing drag-and-drop

To highlight some of the basic features and considerations of drag-and-drop we'll create a shopping basket application, which can be used by visitors to drag products they want to buy into the basket.

The page that we'll end up with by the end of this example will look like this:

Implementing drag-and-drop

We'll need to include the ever-present yahoo-dom-event.js and reset-fonts-grids.css, to which we'll add dragdrop-min.js.

We'll use the doc3 100% fluid page layout and the t6 template to give us a convenient right-hand side bar in the main body of the page into which we can place our shopping basket. A further CSS file contains all the decoration ...

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