Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

93 lines (81 sloc) 1.714 kb
<!DOCTYPE html>
<script src="lib/jquery.js"></script>
<script src="src/jquery.dragon.js"></script>
.dragon {
float: left;
height: 100px;
width: 100px;
#dragon-basic {
background: #f00;
#dragon-x {
background: #00f;
#dragon-y {
background: #0f0;
#dragon-container {
border: dotted 1px #000;
height: 300px;
position: absolute;
top: 120px;
width: 300px;
#dragon-contained {
background: #0ff;
#dragon-handle {
background: #ff8;
<div id="dragon-container">
<div id="dragon-contained" class="dragon">
<p>Drag me within my bounds!</p>
<div id="dragon-basic" class="dragon">
<p>Drag me anywhere!</p>
<div id="dragon-x" class="dragon">
<p>Drag me left and right!</p>
<div id="dragon-y" class="dragon">
<p>Drag me up and down!</p>
<div id="dragon-handle" class="dragon">
<p>Drag me by my text!</p>
'handle': 'p'
'axis': $.fn.dragon.AXIS_Y
'axis': $.fn.dragon.AXIS_X
'onDragStart': function (evt) {
console.log('Drag start.');
,'onDrag': function (evt) {
,'onDragEnd': function (evt) {
console.log('Drag end.');
'within': $('#dragon-container')
Jump to Line
Something went wrong with that request. Please try again.