home >
Drag n Drop
Set outer div to have these styles,
(note: items in bold can be in an stylesheet other properties have to actually be directly on the div. Not sure why, might be some DOM bug.)
- cursor: move;
- position: relative;
- top: 0;
- left: 0;
- filter: alpha(opacity=100); /* (for IE) */
- opacity: 1; /* (Mozilla, etc...) */
Use the onmousedown handler to call this function passing in the event like so:
onmousedown="dragPress(event);"
NOTE: This needs to be beefed up to handle drop zones for drag and drop list sorting, moving contacts between groups, etc... as well as
changing the z-index to bring the box currently being dragged to the front.
Box 1
Box 2
Box 3