From c8089bf756639e1467947f7b87c14fe9a5e9f95c Mon Sep 17 00:00:00 2001 From: Pavel Reznikov Date: Mon, 17 Nov 2014 01:02:26 -0800 Subject: [PATCH] add_widget API call sample --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 5c9493e..d3d33ed 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,13 @@ Parameters: - `auto_position` - if `true` then `x`, `y` parameters will be ignored and widget will be places on the first available position +```javascript +$('.grid-stack).gridstack(); + +var grid = $('.grid-stack).data('gridstack'); +grid.add_widget(el, 0, 0, 3, 2, true); +``` + ### remove_widget(el) Removes widget from the grid.