dragging.js
v1.0.0
Published
A very small and simple plugin for dragging animation.
Downloads
1
Maintainers
Readme
Dragging.js
A lightweight jQuery plugin that transforms any HTML block into a darggable block.
Example
Quick start
Include jQuery:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
Include Dragging.js:
<script src="dist/jquery.Dragging.min.js"></script>
Call the Dragging.js:
$('#element').Dragging(); // speed $('#element').Dragging({ speed: 300 }); // vertical horizontal $('#element').Dragging({ vertical: true, horizontal: true }); // rotate $('#element').Dragging({ rotate: false }); // all together $('#element').Dragging({ speed: 300, vertical: true, horizontal: true, rotate: false });
Options
- speed any number (default 300)
- vertical true or false (default true)
- horizontal true or false (default true)
- rotate true or false (default false)
Requires
jQuery v1.6.0+
Credits
License
The MIT License (MIT).