From 4da1716cfd88ac9b4a8362f715c081c2f75bd316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 24 May 2012 15:10:49 -0400 Subject: [PATCH] Draggable: Fixed destroy method. --- ui/jquery.ui.draggable.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/ui/jquery.ui.draggable.js b/ui/jquery.ui.draggable.js index 5eb235642..1845f0891 100644 --- a/ui/jquery.ui.draggable.js +++ b/ui/jquery.ui.draggable.js @@ -55,17 +55,9 @@ $.widget("ui.draggable", $.ui.mouse, { }, - destroy: function() { - if(!this.element.data('draggable')) return; - this.element - .removeData("draggable") - .unbind(".draggable") - .removeClass("ui-draggable" - + " ui-draggable-dragging" - + " ui-draggable-disabled"); + _destroy: function() { + this.element.removeClass( "ui-draggable ui-draggable-dragging ui-draggable-disabled" ); this._mouseDestroy(); - - return this; }, _mouseCapture: function(event) {