开发者

Attach draggable div to another div

开发者 https://www.devze.com 2023-02-19 22:20 出处:网络
I\'m trying to use jQuery UI draggable/droppable plugins. I have draggable div that I drag onto target div. Target div is also draggable. I can\'t seem to be able to figure out a way to attached div

I'm trying to use jQuery UI draggable/droppable plugins.

I have draggable div that I drag onto target div. Target div is also draggable. I can't seem to be able to figure out a way to attached divs to their target to move them together when I drag target div.

Any pointers in the开发者_如何学JAVA right direction would be highly appreciated.


Is this what you're trying to achieve? http://jsfiddle.net/wfG3L/5/

If you want to add the draggable div, you can just use $(ui.draggable) directly and append it to the target div, that way you don't have to specify the dropped divs in the .stackDrop to be draggable.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号