HomeSoftwareScriptsNotesToolboxGallery
Scripts
2D Rotation (JS)3D Rotation (JS)Ping Flood (CMD)Self Signed CertPHP Database InterfaceAutoWrite (JS)Digitize Text (JS)GrafJS (JS)Image Animation (JS)ASCII Loading Indicator (JS)Div Layer Movement (JS)Div Layer Resizing (JS)Text Scrolling (JS)Statistics Graph (PHP)Turn off AAM/APM (BAT)RW Protect (BAT)SRT Renamer (PHP)String Encryption (PHP)Windows WiFi Hotspot (BAT)YouTube DL Script (BAT)

Moving a Div Layer With JavaScript


Formula and example included.

Pseudo formula:
New style.left = MovingMouseX-(PushedMouseX-PreviousStyleLeft) New style.top = MovingMouseY-(PushedMouseY-PreviousStyleTop)

With this formula you will move the layer relative to where you clicked on it.

Click on and hold, to move this layer.