Skip to content

Latest commit

 

History

History
24 lines (20 loc) · 805 Bytes

README.md

File metadata and controls

24 lines (20 loc) · 805 Bytes

dragndrop

dragndrop.js is lightweight javascript micro-framework to create drag & drop functionality, Easy-to-use.

Installation

  1. Copy code of src/dragndrop.min.js
  2. Create file dragndrop.min.js in your project dist folder
  3. Write <script src="dist/dragndrop.min.js"></script> in your .html page

How to Use

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>