Open lgm42 opened 10 years ago
Consider reading the API first next time.. You would find a http://gridster.net/#serialize_params_opt
In your case, you will use it like this:
element.gridster({
...
serialize_params: function ($w, wgd) {
return {
id: $w.prop('id'),
col: wgd.col,
row: wgd.row,
size_x: wgd.size_x,
size_y: wgd.size_y,
};
},
...
});
Okay thank you I have seen this function but I haven"t understand its functionnality !
Thank you very much !
Is it possible to have the id of the < li > if given in serialization command ? It will be more easily to get div configuration. Because today, we must save the insertion order at the beginning and when I serialize, I must retreive my insertion list and the serialization result to save each widget configuration.
If I have < li id="widget0" data-row="1" data-col="1" data-sizex="2" data-sizey="2" >0< /li > It would be cool to have in result :
[{"id":"widget0","col":1,"row":1,"size_x":2,"size_y":2}]