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('')
.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]
I'm sorry for my bad english
--
View this message in context:
http://www.nabble.com/jquery-ui-portlet-tp24451440s27240p24451440.html
Sent from the jQuery UI Discussion mailing list archive at Nabble.com.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---