jquery sortable cannot be dragged outside of accordion

前端 未结 3 1415
刺人心
刺人心 2021-01-24 18:23

I have 2 connected sortable lists. One is inside an accordion. When I try to drag items from the sortable in the accordion, the helper disappears as soon as I get outside of t

3条回答
  •  甜味超标
    2021-01-24 18:52

    In your sortable call you want to use the following options:

    helper: "clone", appendTo: "body", // or whatever element you want the helper clone to be attached to

    This does two things. First it makes a copy of the element being dragged (helper option), second it attaches that helper to the specified element (appendTo option).

    Similar question here: jQuery-Ui: Cannot drag object outside of an accordion

提交回复
热议问题