From 073fdc40e0a94dd371646fc54cd420e3ddab0254 Mon Sep 17 00:00:00 2001 From: Vitaliy Velikodniy Date: Fri, 23 Nov 2012 11:30:34 +0200 Subject: [PATCH] feat(draggable): Add toggle draggable method. --- dist/jquery.gridster.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dist/jquery.gridster.js b/dist/jquery.gridster.js index c1b151660..707a50ab6 100644 --- a/dist/jquery.gridster.js +++ b/dist/jquery.gridster.js @@ -951,6 +951,18 @@ return this; }; + /** + * Toggle dragging. + * + * @method toggle + * @return {Class} Returns the instance of the Gridster Class. + */ + + fn.toggle = function() { + (this.drag_api.disabled) ? this.drag_api.enable() : this.drag_api.disable(); + return this; + }; + /**