This example demonstrates how to use drag handles to control the specific places within an element from which a drag can be initiated.
The YUI Drag and Drop Utility lets you make HTML elements draggable.
For this example, we will enable drag and drop for the three
Now we instantiate three
YAHOO.util.DD instances. By default, a
on any part of source element would start a drag operation. We use
setHandleElId to make it so that only a specific area or
areas of the source element will start a drag when clicked.
Elements that are not a child of the source element can be used as drag
handles by using
Note: Logging and debugging is currently turned off for this example.
All YUI 2.x users should review the YUI 2.8.2 security bulletin, which discusses a vulnerability present in YUI 2.4.0-2.8.1.