Drog.js is a tiny (1kb minified), cross-browser, and mobile-friendly drag and drop JavaScript library.
1. Import the Drog.js into your project.
<script src="Drog.min.js"></script>
<!-- OR --> import "Drog.min.js";
2. Enable the drag’n’drop functionality on an element within the document.
<form name="drag-head">
<div data-drog>
<span>Click here to move</span>
</div>
<p>Move</p>
<p>this</p>
<p>ELEMENT</p>
</form> Drog.on(document.forms["drag-head"]);
3. Move the element to a specific position.
letx = 100; let y = 100; Drog.move(document.forms["drag-head"], x, y)
06/27/2025
v1.2.0 (09/25/2021)
The post Mobile-friendly Drag And Drop JavaScript Library – Drog.js appeared first on CSS Script.
Everybody’s trying to get in on Cosmic Orange. | Photo: Allison Johnson / The Verge…
Mobile World Congress 2026 is still in full swing in Barcelona, Spain, with announcements continuing…
Let me let you in on a little secret: Amazon’s kid-friendly e-readers are a better…
In boardrooms and security operations centers alike, one metric has risen from a niche KPI…
In boardrooms and security operations centers alike, one metric has risen from a niche KPI…
A new malvertising campaign is actively targeting macOS users worldwide, delivering a new variant of…
This website uses cookies.