jQuery ui portlet position

jQuery ui portlet position


jQuery ui portlet
I have a problem with jQuery ui portlet.
We say that everything works and can save in the mysql db position of
div, but I do not know how to load their position to the loading of
the page, and then at every refresh the portlet back into their
natural position which is the html code.
Suggestions?
Meanwhile, place some code
[CODE]
$("#contenitore-centrale .column").sortable({
connectWith: [ '#contenitore-centrale .column' ],
handle: '.portlet-header',
opacity: 0.6,
items: '> .portlet',
tolerance: 'pointer',
revert: true,
distance: 2,
helper: 'clone',
update: function() {
},
stop: function(event, ui) {
var postVars = {
action: 'portlet-order',
}
$("#contenitore-centrale .column").each(function(){
var $posizione = $(this).sortable('serialize');
var $column_id = $(this).attr('id');
postVars["order[" + this.id.split('-')[0] + "]"] = $(this).sortable
( 'toArray' ).join(',');
});
$.post("code/posizione.php", postVars , function(theResponse){
$("#results").html(theResponse);
});
}
});
$(".portlet").addClass("ui-widget ui-widget-content ui-helper-clearfix
ui-corner-all")
.find(".portlet-header")
.addClass("ui-widget-header ui-corner-all")
.prepend('<span class="ui-icon ui-icon-plusthick"></span>')
.end()
.find(".portlet-content");
$(".portlet-header .ui-icon").click(function() {
$(this).toggleClass("ui-icon-minusthick");
$(this).parents(".portlet:first").find(".portlet-content").toggle();
});
$(".column").enableSelection();
[/CODE]
sorry for my bad english