Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 557 Bytes

README.md

File metadata and controls

22 lines (17 loc) · 557 Bytes

simpleDrag

This project provide a function that make your target element can be dragged in your web page.

Usage

1.Import the drag.js into your page.
2.Set the bar and target element.

  <script type="text/javascript">
    var bar = document.getElementById('bar');           //the element your mouse focus
    var target = document.getElementById('target');     //the target element you want to drag
    setDrag(bar, target);
  </script>

Example

example.html provided an example of this script file.