i adjusted my serialize_params to walk to attributes of the li and recover all html5 "data-" attributes.. i store these in database via "SON.stringify".. and load by simple foreach on data..a bit more dynamic.. :) note had to change your internal varibles size_y and sizex to sizex sizey as cuases issues with html5 data tages...
but just thought people might want to see this
calvin streeting
var grid = $(".gridster ul").gridster({
widget_margins: [5, 5],
widget_base_dimensions: [200, 200],
draggable: {
stop: function(event, ui){
$("#desktop").val(JSON.stringify(grid.serialize()));
$("#desktopSave").show();
}
},
serialize_params: function ($w, wgd) {
var rtn = {};
$w.each(function() {
$.each(this.attributes, function(i, attrib){
var name = attrib.name;
if (name.substring(0,5)=="data-"){
var value = attrib.value;
rtn[name.substring(5)] = value;
}
});
});
return rtn;
}
}).data("gridster");
i adjusted my serialize_params to walk to attributes of the li and recover all html5 "data-" attributes.. i store these in database via "SON.stringify".. and load by simple foreach on data..a bit more dynamic.. :) note had to change your internal varibles size_y and sizex to sizex sizey as cuases issues with html5 data tages...
but just thought people might want to see this
calvin streeting