Destroy JQuery draggable
From the jQuery UI API:
destroy()
Removes the draggable functionality completely. This will return the element back to its pre-init state.
This method does not accept any arguments.
Code examples:
Invoke the destroy method:
$( ".selector" ).draggable( "destroy" );
EDIT
As this seems to not work properly for you - and it's an issue being seen all around the jQuery forums - that's a proposed fix:
ui.draggable.draggable("option", "revert", false);
you need to check before destroying
if ($el.data('ui-draggable')) { // error to call destroy if not there
$el.draggable('destroy');
}
In jQuery >2.1.0 it's 'ui-draggable'