diff --git a/README.md b/README.md index 9fe28c4..8d8a2f7 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/demo/serialization.html b/demo/serialization.html new file mode 100644 index 0000000..b596196 --- /dev/null +++ b/demo/serialization.html @@ -0,0 +1,112 @@ + + + + + + + + + Serialization demo + + + + + + + + + + + + + + +
+

Serialization demo

+ +
+ Save Grid + Load Grid + Clear Grid +
+ +
+ +
+
+ +
+ + +
+ + + + +