diff options
author | Paul Bakaus <paul.bakaus@googlemail.com> | 2008-07-14 14:24:00 +0000 |
---|---|---|
committer | Paul Bakaus <paul.bakaus@googlemail.com> | 2008-07-14 14:24:00 +0000 |
commit | 3b300faa61b953235ccba63b3625c3e8a419e05b (patch) | |
tree | b271518eb734f6509b619f973d2b123dc378a2db /ui | |
parent | c54f6ba62efb9c59cc846a0ec9e90750a93eab91 (diff) | |
download | jquery-ui-3b300faa61b953235ccba63b3625c3e8a419e05b.tar.gz jquery-ui-3b300faa61b953235ccba63b3625c3e8a419e05b.zip |
draggable: removed adding the class ui-draggable in favor of the new data selector
Diffstat (limited to 'ui')
-rw-r--r-- | ui/ui.draggable.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ui/ui.draggable.js b/ui/ui.draggable.js index e22806b2e..10bc32e52 100644 --- a/ui/ui.draggable.js +++ b/ui/ui.draggable.js @@ -28,7 +28,6 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, { if (o.helper == 'original' && !positioned.test(position)) style.position = 'relative'; - this.element.addClass('ui-draggable'); (o.disabled && this.element.addClass('ui-draggable-disabled')); this.mouseInit(); @@ -264,7 +263,7 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, { }, destroy: function() { if(!this.element.data('draggable')) return; - this.element.removeData("draggable").unbind(".draggable").removeClass('ui-draggable'); + this.element.removeData("draggable").unbind(".draggable").removeClass('ui-draggable-dragging ui-draggable-disabled'); this.mouseDestroy(); } })); @@ -388,7 +387,7 @@ $.ui.plugin.add("draggable", "snap", { var inst = $(this).data("draggable"); inst.snapElements = []; - $(ui.options.snap === true ? '.ui-draggable' : ui.options.snap).each(function() { + $(ui.options.snap === true ? ':data(draggable)' : ui.options.snap).each(function() { var $t = $(this); var $o = $t.offset(); if(this != inst.element[0]) inst.snapElements.push({ item: this, |