The deal with draggables and droppables
Dragging and dropping as behaviors go hand-in-hand with each other. Where one is found, the other is invariably close by. Dragging an element around a web page is all very well and good, but if there's nowhere for that element to be dragged to, the whole exercise is usually pointless.
You can use the draggable
class independently from the droppable
class, as pure dragging for the sake of dragging can have its uses, such as with the dialog component. However, you can't use the droppable
class without the draggable
class. You don't need to make use of any of draggable's methods of course, but using droppables without having anything to drop on to them is of no value whatsoever.
Like with the widgets, it is possible, however, to combine some of the interaction helpers; draggables and droppables go together obviously. But draggables can also be used with sortables, as we'll see in Chapter 13, Selecting and Sorting with jQuery UI, as well as resizables.