- Menu scripts
- Window scripts
- Calendar scripts
- Gallery scripts
- Form widgets
- Tab view scripts
- Table widgets
- Drag and drop
- Folder trees
- Tooltips
- AJAX scripts
- Content Effects

- Misc scripts
- Javascript games
- Chess widgets
- DHTML Suite
- Resources
- cbolson.com
Download dragable content script
Licensing
This script is distributed under the LGPL open source license.
Commercial licenses are also available. Some of these licenses also includes personal e-mail support for up to 1 year.
Download script
You can download the entire script from this Zip file.
Configuration
You make elements draggable by assigning them to the class "dragableElement". Examples:
<img src="images/image1.jpg" style="float:left" class="dragableElement"> <div id="keyText" class="dragableElement">You can drag this box as well as the images on this page</div>
These are some examples take from the demo.
Remember position and z-index in cookie
You can configure the script to remember the position of the dragable elements in a cookie. This is done by adding lines like this
<script type="text/javascript">
var rememberPositionedInCookie = true;
var rememberPosition_cookieName = 'demo';
</script>
right above the place where you include dragable-content.js.
Rate this script at Hotscripts.com
Update log
- June, 14th, 2006 - New feature: Remember position and z-index in cookie
Comments
Post your comment
Please wait...



Just one problem, if you make a text field a movable object it wont let you click the box and insert content, is there anyway around this?
I have been looking for something like this but with the text field for weeks and would be so grateful if you could help me, thank you.
I have added a fix to this problem. You can download a new zip file or simply change line 94 to:
if(source.tagName.toLowerCase()=='input' || source.tagName.toLowerCase()=='textarea')return;
i.e. simple return; instead of return false;
I've tried to follow the instructions above but I can't make it work.
Any help would be good.
Thanks.
James.
<script type='text/javascript'>initdragableElements();</script>
It is in the demo on this site, that's how I found the difference from the download files.
The download package has been updated.
One more thing I noticed, when using google chrome or firefox, the code seems to break. I use hidden divs on my page which overlay when shown, in IE it works great, I click my link and the div is shown and is dragable, however in chrome I can't get the div to even be shown. All I did was add a span tag wrapped around my entire div, and the span has the dragable class assigned to it.
Chrome is extremely strict, so might be a minor thing, just something to check out since it may affect other scripts of yours as well. If I find a solution, I will post it.
Thanks for all your help and great scripts over the years.
Paul
What exactly do you want the script to do ?
---
Alf
<p></p>can somebody help me where i can input a quantity let say a textbox? and a remove button here in this particular link.
<p></p>can you edit the lines of code there and come out with inputed quantity and a remove link
<p></p>and somehow to print a receipt afterwards
<p></p>thank you advance
cchalkdust@yahoo.com - can someody email me the answer to my problem thanks :)
thank you
If you start typing in a previously empty textarea and then start dragging, the text will be gone.
You will also run into problems, if you submit your form via a javascript...
David
mail me too hendi_yanuar@yahoo.co.id
I would like this so that when the user returns, all divs etc... are in the positions that they left them in.
Cookies will not work for this as they may use a different computer.
Thanks
Nick
I love the script, but is there anyway of adding to the cookies the visibility of the div boxes so they are remembered?
I would also like some of the div boxes to start as hidden??
Please help