diff --git a/src/jquery.draggable.js b/src/jquery.draggable.js index 7f05e3aad..ccbee1934 100644 --- a/src/jquery.draggable.js +++ b/src/jquery.draggable.js @@ -358,11 +358,7 @@ //jQuery adapter $.fn.drag = function ( options ) { - return this.each(function () { - if (!$.data(this, 'drag')) { - $.data(this, 'drag', new Draggable( this, options )); - } - }); + return new Draggable(this, options); }; diff --git a/src/jquery.gridster.js b/src/jquery.gridster.js index 0e23d08be..e47715fac 100644 --- a/src/jquery.gridster.js +++ b/src/jquery.gridster.js @@ -682,7 +682,7 @@ }, 60) }); - this.drag_api = this.$el.drag(draggable_options).data('drag'); + this.drag_api = this.$el.drag(draggable_options); return this; };