Minimal Image Panning Library – LC-Mouse-Drag
Supports both mouse drag and touch swipe events.
1. Import the lc-mouse-drag.js JavaScript library into the document.
<script src="lc-mouse-drag.js"></script>
2. Initialize the library on the image container as follows:
<div id="inner"> <img src="demo.webp" /> </div>
lc_mouseDrag('#inner'); 3. Determine the animation delta when ending dragging. Default: 0.3.
lc_mouseDrag('#inner', 0); 4. Disable X-axis and/or Y-axis dragging. Default: false.
lc_mouseDrag('#inner',
0, true, false); 5. Important CSS rules for desktop.
body:not(.lc_mousedrag_is_mobile) #inner {
overflow: hidden;
cursor: grab;
} v1.0.2 (10/31/2025)
The post Minimal Image Panning Library – LC-Mouse-Drag appeared first on CSS Script.
PARIS, March 10, 2026 — Qevlar AI, a leader in AI for transforming security operations…
In Beirut, we start our days with the latest litany of places and people hit…
GreatPen.xyz – Squarespace customer – (United States) The .xyz community includes independent designers and creatives…
The National Film and Sound Archive (NFSA) of Australia has today announced it has acquired…
Today's links AI "journalists" prove that media bosses don't give a shit: In case there…
AI can draft emails, analyze data and complete tasks at an incredible speed, but the…
This website uses cookies.