JQuery Dragging Outside Parent

前端 未结 5 2096
后悔当初
后悔当初 2020-12-20 11:31

I\'m using JQuery\'s draggable(); to make li elements draggable. The only problem is when the element is dragged outside its parent, it doesn\'t show up. That is, it doesn\'

5条回答
  •  失恋的感觉
    2020-12-20 12:06

    I landed on this page with the exact same problem, and Brendan's answer got me close. Setting the appendTo option didn't help, but I was able to resolve my issue by adding overflow: visible to the parent of my draggable element. Turns out I was sloppily inheriting hidden from somewhere up the chain.

    Side note, it looks like this works because jQuery UI moves the draggable element by dynamically setting positioning relative to the parent - this was new intel for me!

提交回复
热议问题