Download
User Rating: 4.4/5 ( 2 votes)
tinyDraggable is a minimalistic jQuery plugin for making objects draggable.
Compatible with jQuery 1.5+ in Firefox, Safari, Chrome, Opera, Internet Explorer 7+. No dependencies except the jQuery library.
-
Extremely lightweight: 0.5 kB of uncompressed JavaScript
-
Options for selecting and excluding drag handles
uygun ucak bileti -
atlas jet ucak bileti -
atlas jet/
1. INCLUDE JS FILES
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="jquery.tiny-draggable.js"></script>
2. HTML
<div class="draggable_container">
<div id="item1" class="obj" style="top:0;left:0;min-width:90px">Drag me!</div>
<div id="item2" class="obj" style="top:0;left:220px;min-width:120px;cursor:text">
<p>Selected Drag Handle</p>
<div class="handle">Drag Handle</div>
</div>
<div id="item3" class="obj pure-form" style="top:0;left:500px">
<p>Excluded Handles</p>
<p><input type="text" value="Excluded Text Input ..."></p>
<div class="exclude_me">Excluded Element</div>
</div>
</div>
3. JAVASCRIPT
$('#item1').tinyDraggable();
$('#item2').tinyDraggable({ handle: '.handle' });
$('#item3').tinyDraggable({ exclude: '.exclude_me, input' });
4. OPTIONS
tinyDraggable accepts settings from an object of key/value pairs, and can be assigned to any absolute positioned element.
$(selector).tinyDraggable({key1: value1, key2: value2});
Settings
Property |
Default |
Description |
handle |
null |
jQuery selector for all elements serving as grab handle. |
exclude |
null |
jQuery selector for elements that must not trigger the dragging event. |