Link to home
Start Free TrialLog in
Avatar of Eternal_Student
Eternal_StudentFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Drag/drop absolute div

I have a div that is positioned absolutely and it has some content inside including a scrolling div which contains unordered lists which contain links.

What I want to do is be able to drag this div and drop it [so only the container div is draggable.

I tried this script:

http://www.dynamicdrive.com/dynamicindex11/domdrag/

But when I try and scroll the inner div it attempts to drag when really all I want to do is scroll. So it seems that all of the child divs and elements have the drag too. I thought the z-index would hide the container div from the other divs.
ASKER CERTIFIED SOLUTION
Avatar of xtcharles
xtcharles

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Eternal_Student

ASKER

I already have all of the functionality I need except for one function to drag an absolutely positioned div which has a scrollable div inside.

I always get overwhelmed by sciptaculous and other Javascript libraries.

Any ideas? Concerning my original question?
Avatar of xtcharles
xtcharles

Ok, well I think your best bet for a fast and working solution would be to try one of those libraries.

Usually it's extremely simple to implement something with one of those libraries. For example, to use the thickbox library, all you have to do is load the javascript and put a certain class name within what you wanted to control(In the case of thickbox, your <a> will now spawn a lightbox.).

I found within mootools a customizable download that has drag and drop includes.

Check it out here: http://mootools.net/download/