GIJGO
Examples
Documentation
Report a Bug
Download
Draggable Div
Gijgo.com
Draggable
Examples
Draggable Div
Draggable Div
Click on the div and start dragging
Preview
Front-End Code
Edit
<!DOCTYPE html> <html> <head> <title>Draggable plugin</title> <meta charset="utf-8" /> <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> <script src="https://unpkg.com/gijgo@1.9.14/js/gijgo.min.js" type="text/javascript"></script> <link href="https://unpkg.com/gijgo@1.9.14/css/gijgo.min.css" rel="stylesheet" type="text/css" /> <style type="text/css"> .element { border: 1px solid #999; width: 200px; height: 200px; text-align: center; } .cursor-move { cursor: move; } .handle { background-color: #DDD; cursor: move; width: 150px; margin: 5px auto 0px auto; text-align: center; padding: 5px; } </style> </head> <body> <div id="element1" class="element cursor-move">drag me</div> <div id="element2" class="element"> <div id="handle" class="handle cursor-move">Handle for dragging</div> </div> <script> $('#element1').draggable(); $('#element2').draggable({ handle: $('#handle') }); </script> </body> </html>
;