dragndrop.js is lightweight javascript micro-framework to create drag & drop functionality, Easy-to-use.
- Copy code of src/dragndrop.min.js
- Create file dragndrop.min.js in your project dist folder
- Write
<script src="dist/dragndrop.min.js"></script>
in your .html page
You have to simply initialize drop zone (where elements will be dropped) and draggables (elements that will be dragged):
<div id="drop-zone"></div>
<div class="draggable">Draggable</div>
<div class="draggable">Draggable</div>
<div class="draggable">Draggable</div>
<script src="dist/dragndrop.min.js"></script>
<script>
dragndrop.dropZone('#drop-zone');
dragndrop.draggable('.draggable');
</script>