dragging and dropping portlets between jquery ui tabs?
i'm building a portlet style site with tabs using jquery 1.4.2, and jquery ui 1.8.2. the portlets were easy to get working with the sortable p开发者_开发知识库lugin. tabs were easy as well. the problem i'm having is in trying to drag portlets BETWEEN tabs. since the same containers that the portlets are sortable to (columns) are present in all tabs, it seems like it should be doable.
my approach is to set a flag to true when i start dragging a portlet, and false when i let it go. then when i detect a mouseenter to one of the tabs (the li in the ul that the tabs functionality expects), select that tab.
the problem is that even though the mouseenter event is fired reliably when i'm not holding onto a portlet, it's really flaky if i am. i have to drag the portlet on and off the tab link, all around for a while and eventually i can get it to fire. any suggestions as to how to make the behavior more reliable?
Have you checked out this demo 'Connect Lists through tabs' on the jQuery UI demo site?
精彩评论