Skip to content

anshuthopsee/dragToMove.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dragToMove.js

A tiny JavaScript library to make DOM elements movable with mouse or touch.

Usage

import { dragToMove } from "./dragToMove.js";

//Takes in two arguments
// 1. Main HTML element.
// 2. Child element inside the Main, on which the clicking and the dragging happens.
dragToMove(document.querySelector('div'), document.querySelector('.handle'));

About

A tiny JavaScript library to make DOM elements movable with mouse or touch.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published