Skip to content

Commit 073fdc4

Browse files
g0ddestvieron
authored andcommittedFeb 14, 2014
feat(draggable): Add toggle draggable method.
1 parent e21f63a commit 073fdc4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
 

‎dist/jquery.gridster.js

+12
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,18 @@
951951
return this;
952952
};
953953

954+
/**
955+
* Toggle dragging.
956+
*
957+
* @method toggle
958+
* @return {Class} Returns the instance of the Gridster Class.
959+
*/
960+
961+
fn.toggle = function() {
962+
(this.drag_api.disabled) ? this.drag_api.enable() : this.drag_api.disable();
963+
return this;
964+
};
965+
954966

955967

956968
/**

0 commit comments

Comments
 (0)