@File: /surebert/drag.js
@Description: Used by Element.prototype.makeDraggable.
<div id="dragme" class="dragPaper" ><p class="dragHandle" style="background-color:red;border:1px solid black;">Drag From Here</p><p>Here is an drag box with a handle and some text</p></div>
var draggableThing = $('#dragme');
draggableThing.makeDraggable();
//to stop this element from being draggable
//draggableThing.makeUnDraggable();
//the this refers to the element being dragged
draggableThing.ondrag = function(e, pos){
document.title = e.clientX;
};
//the this referes to the element being dragged
draggableThing.ondragstop = function(e){
document.title = e.clientX;
};
//the this referes to the element being dragged
draggableThing.ondragstart = function(e){
document.title = e.clientX;
};
//locks the x axis from being dragged e.g. only drags up and down
draggableThing.lockX=1;
//locks the y axis from being dragged e.g. only drags left to right
draggableThing.lockY=1;