...

View Full Version : jQuery sortable portlets



rakasv
11-11-2010, 05:25 PM
hi!!
i was looking at

http://jqueryui.com/demos/sortable/#portlets

and it is exactly what i am looking for, almost. I'd like to know if its possible that the portlets appear closed form the beggining and then they could be opened by te click event... :confused:

in advance, thanks a LOT !!

rakasv
11-11-2010, 07:01 PM
never mind... i already figured it out... i'll leave it here for some one else =)


$(".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 style="margin-top:4px;margin-right:3px;" class="ui-icon ui-icon-minusthick"></span>')
.end()
.find(".portlet-content")
.hide();
$(".portlet-header .ui-icon").click(function() {
$(this).toggleClass("ui-icon-minusthick ui-icon-plusthick");
$(this).parents(".portlet:first").find(".portlet-content").toggle();
});
$(".column").disableSelection();
});

i hope it's usefull



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum