A simple ES6 library that allows click/touch & drag on dom elements. 541 bytes minified + gzipped.
<div class=" _JS_zoomParent"> <!-- parent -->
<div class="_JS_ZoomObj"> <!-- thing to drag -->
<img class="_JS_ZoomImg" src="http://vignette2.wikia.nocookie.net/uncyclopedia/images/b/b4/Count-chocula.jpeg/revision/latest?cb=20110419172355"> <!-- contents -->
</div>
</div>
const myDraggableElem = Object.create(dragElem);
myDraggableElem.inint(`.my-selector`);
You can pass in a callback function.
const myDraggableElem = Object.create(dragElem);
myDraggableElem.init(`.my-selector`, e => {
console.log(this, e);
});
Yes. It does the mobile things.