|Views Total:||3,249 views|
|Official Page:||Go to website|
|Last Update:||May 26, 2019|
Thanks to the CSS transform property, the library automatically calculates the new position of the element relative to the top left of the page and then re-position the element to prevent from breaking the layout.
How to use it:
Insert the minified version of the Draggin.js into the document.
Add the CSS class ‘draggable’ to any element which should be draggable.
<img class="draggable" src="1.jpg"> <h1 class="draggable">Drag me</h1>
Make a text element editable with the ‘text’ class.
<h1 class="draggable text">Drag me</h1>
- Added support for IE and Edge
- Rename dragScript.js to draggin.js