How to make a draggable across divs

前端 未结 3 717
清酒与你
清酒与你 2021-01-27 02:14

How do I make elements draggable between two divs? This seems to be something that draggables should do. But I haven\'t been able with the code I have. In this jsfiddle I hav

3条回答
  •  无人及你
    2021-01-27 02:38

    There's a similar Stack Overflow question that was answered here: jquery ui draggable elements not 'draggable' outside of scrolling div

    I implemented the above solution on my own project and it worked beautifully.

    I agree that it does seem like if you set the containment to window or document, cross-div dragging should be allowed. I imagine that you'd prefer overflow to stay hidden due to the amount of content you want to keep in your divs.

提交回复
热议问题