Jquery UI: drag new sortable list

I've found jQuery UI demo, which connects draggable and sortable plugins. (http://jqueryui.com/demos/draggable/sortable.html) I would like to make some kind of tree, create similar draggable emlement (yellow) that could be dragged to the old list and at once it would be a another, new sortable list (in which i can put another draggable elements) Code i've modified: $(function() { $( ".sortable" ).sortable({ revert: true }); $( ".draggable" ).draggable({ connectToSortable: ".sortable", helper: "clone", revert: "invalid" }); $( "ul, li" ).disableSelection(); });
  • any element
  • first element
  • second element
does not work propely. I can only put 'any element' on #sortable-2, only when #sortable-2 is on draggable unsorted list. When I move #sortable-2 list on correct position ( between first and second element I can't put 'any element' on it ) I would appreciate any answers. Thank you!

以上就是Jquery UI: drag new sortable list的详细内容,更多请关注web前端其它相关文章!

赞(0) 打赏
未经允许不得转载:web前端首页 » jQuery 答疑

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

前端开发相关广告投放 更专业 更精准

联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏