How can I drag an element into a dropdown list using jQuery UI sortable()?

后端 未结 1 1907
滥情空心
滥情空心 2021-02-10 00:09

Short version: How can I drag Link 1 into one of the dropdowns under Link 3 in this demo? http://jsfiddle.net/Gdadu/2/

相关标签:
1条回答
  • 2021-02-10 00:42

    Here is a fiddle that shows a few points that can help you with your implementation: http://jsfiddle.net/Gdadu/13/

    It is far from perfect, and as pointed out in the comment, there is a few logical problems also with "sorting everything everywhere" :) Things not working here are sorting nested li's back to top level, sortables on nested ul's, ... but I think they are sketched out there. Distinguishing the sorting from the dragging might be one thing necessairy with jqueryui's current status. Also I shortcut your excellent css solution for the submenus and made them javascript based as to simplify things a bit.

    But: You can drop link1 inside link3 or link3's nested ul ;)

    0 讨论(0)
提交回复
热议问题