swingdrag.js---a jQuery UI plugin, which adds a nice swing effect to the jQuery UI drag function
GitHub here
swingdrag is a jQuery UI plugin, which adds a nice swing effect to the jQuery UI drag function.
Step1:
link the swingdrag.css file
<link rel="stylesheet" type="text/css" href="css/swingdrag.css">link the jquery , jquery-ui and swingdrag.min.js
Step2:
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<script type="text/javascript" src="js/jquery.ui.swingdrag.min.js"></script>
![]() |
| html |
Wrap the content in the div named container.
![]() |
| css |
Basic styling sheet.
![]() |
| swingdrag.css |
Step3:
JS Usage
![]() |
| js |
$("#element").swingdrag({ // The angle of rotation in degree. default is 8 rotationAngleDeg: 10, // Indicates whether a pickup-/drop shadow should be shown. showShadow: true, // The pick up scale factor indicates the size change during dragging. pickUpScaleFactor: 1.2});



