jQuery-Ui:无法将对象拖动到手风琴之外 [英] jQuery-Ui: Cannot drag object outside of an accordion

查看:118
本文介绍了jQuery-Ui:无法将对象拖动到手风琴之外的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在手风琴小部件中有一个可拖动对象.拖动时,它会约束其父级手风琴元素.我尝试使用包含"选项没有成功.

I have a draggable object inside of an accordion widget. When dragging it, it's constrained its parent, the accordion element. I've tried to use the 'containment' option with no success.

我已经使用FireFox 3.5.5和Chromium 4进行了尝试.

I have tried this with FireFox 3.5.5 and Chromium 4.

有办法解决吗?

谢谢

推荐答案

对于那些正在寻找完整示例的人,请查看

For those of you looking for a complete example, take a look at the Shopping Cart example on the jQuery UI demo. This is a droppable example, but illustrates exactly what was being asked (Dragging a element outside of an accordion).

$(function() {
        $( "#catalog" ).accordion();
        $( "#catalog li" ).draggable({
            appendTo: "body",
            helper: "clone"
        });
});

然后从那里继续.

这篇关于jQuery-Ui:无法将对象拖动到手风琴之外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆