Eternal_Student
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Any ideas? Concerning my original question?
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/
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/
ASKER
I always get overwhelmed by sciptaculous and other Javascript libraries.