diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index 0701f9151..f2c59bc4e 100644 --- a/ui/jquery.ui.draggable.js +++ b/ui/jquery.ui.draggable.js @@ -709,10 +709,11 @@ if ( $.uiBackCompat !== false ) { }); // TODO: handle droppables - // revert option + // revert + revertDuration options $.widget( "ui.draggable", $.ui.draggable, { options: { - revert: false + revert: false, + revertDuration: 500 }, _create : function() { @@ -739,11 +740,11 @@ if ( $.uiBackCompat !== false ) { this.element.on( "dragstop", function( e, ui ) { // Reset to before drag - self.dragEl.css({ + self.dragEl.animate({ left: originalLeft, top: originalTop, position: originalPosition - }); + }, self.options.revertDuration ); });