Categories: CSSScriptWeb Design

Mobile-friendly Drag And Drop JavaScript Library – Drog.js

Drog.js is a tiny (1kb minified), cross-browser, and mobile-friendly drag and drop JavaScript library.

Table of Contents

Toggle

How to use it:

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.

Sponsored
let

Sponsored
x = 100; let y = 100; Drog.move(document.forms["drag-head"], x, y)

Changelog:

06/27/2025

  • update JS

v1.2.0 (09/25/2021)

  • Minor bug fix

The post Mobile-friendly Drag And Drop JavaScript Library – Drog.js appeared first on CSS Script.

rssfeeds-admin

Share
Published by
rssfeeds-admin

Recent Posts

Unihertz’s new QWERTY phone is even more like a Blackberry

Everybody’s trying to get in on Cosmic Orange. | Photo: Allison Johnson / The Verge…

1 minute ago

The best mobile tech announced at MWC 2026 so far

Mobile World Congress 2026 is still in full swing in Barcelona, Spain, with announcements continuing…

1 minute ago

All of Amazon’s kid-friendly Kindles are on sale, including the color version

Let me let you in on a little secret: Amazon’s kid-friendly e-readers are a better…

2 minutes ago

How to Cut MTTR by Improving Threat Visibility in Your SOC

In boardrooms and security operations centers alike, one metric has risen from a niche KPI…

17 minutes ago

How to Cut MTTR by Improving Threat Visibility in Your SOC

In boardrooms and security operations centers alike, one metric has risen from a niche KPI…

17 minutes ago

Malvertising Campaign Delivers AMOS ‘malext’ macOS Infostealer via Fake Text‑Sharing Lures

A new malvertising campaign is actively targeting macOS users worldwide, delivering a new variant of…

17 minutes ago

This website uses cookies.