add_widget API call sample

This commit is contained in:
Pavel Reznikov 2014-11-17 01:02:26 -08:00
parent 446f59a6a9
commit c8089bf756

View file

@ -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.