renamed jQuery adapter for Draggable class to $.fn.drag. Fixes #17.

Prevents name collisions with jQuery UI draggable module.
This commit is contained in:
vieron
2012-08-08 23:33:31 +02:00
parent 2c16638905
commit d78bd254bd
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -315,10 +315,10 @@
//jQuery adapter
$.fn.draggable = function ( options ) {
$.fn.drag = function ( options ) {
return this.each(function () {
if (!$.data(this, 'draggable')) {
$.data(this, 'draggable', new Draggable( this, options ));
if (!$.data(this, 'drag')) {
$.data(this, 'drag', new Draggable( this, options ));
}
});
};
+1 -1
View File
@@ -410,7 +410,7 @@
}, 60)
});
this.drag_api = this.$el.draggable(draggable_options).data('draggable');
this.drag_api = this.$el.drag(draggable_options).data('draggable');
return this;
};