Javascript drag and dropLicense

Ever wanted to drag an element or image on your webpage? You can try using this very lightweight javascript drag handler. You can attach this drag handler to any relative or absolute positioned element.

First include the script at the top of your code (you can find the code in the source code section of this page). Do it in

tag. After loading the script you can write your code to attach drag handler.

You can attach this drag handler to any number of elements on page and you will be able to drag them all. The most importaint thing is that these elements must be posisioned relatively or absolutely.

DEMO


Source code for webtoolkit.drag.js