Skip to content

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

Notifications You must be signed in to change notification settings

hi-sunshine/simpleDrag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published