add serialization demo

This commit is contained in:
Pavel Reznikov 2015-03-09 21:39:21 -07:00
commit a124143a69
2 changed files with 116 additions and 0 deletions

View file

@ -538,6 +538,8 @@ var res = _.map($('.grid-stack .grid-stack-item:visible'), function (el) {
alert(JSON.stringify(res));
```
See example: [Serialization demo](http://troolee.github.io/gridstack.js/demo/serialization.html)
You can also use `onchange` event if you need to save only changed widgets right away they have been changed.
## Load grid from array
@ -565,6 +567,8 @@ _.each(serialization, function (node) {
});
```
See example: [Serialization demo](http://troolee.github.io/gridstack.js/demo/serialization.html)
If you're using knockout there is no need for such method at all.
## Override resizable/draggable options