Provider list for other jQuery sortable lists
I'm trying to develop a sort of NetVibes-like portal using jQuery UI, and I was wondering if an idea I had could be added.
This is my project :
I have several sortable lists mut开发者_高级运维ually connected (using sortable's connectWith property), filled with portlets.
I want to make a list of available portlets the user can add to the portal, using a drag'n'drop move. But the thing is, I don't want to use another sortable list, because the provider list would be displayed using various categories and effects. The point is that the user can only move them to add them to the portal, otherwise they revert back to their previous position. Basically, I think it's just about using the draggable and droppable features, but i'm not very familiar with them.
Anyone could help me with that ? (if you have questions on some points that may not be very clear, don't hesitate)
Thanks
Have you tried to use a droppable div
as a receiver for your sortable li
s? Imho it should work.
$( "#droppable" ).droppable({
accept: "#sortable .some-li-class",
activeClass: "ui-state-hover",
hoverClass: "ui-state-active",
drop: function( event, ui ) {
alert('dropped!');
}
});
Regards,
精彩评论