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

查看:13
本文介绍了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.

有办法解决吗?

谢谢

推荐答案

对于那些正在寻找完整示例的人,请查看 购物车示例 jQuery UI 演示.这是一个可放置的示例,但准确说明了所要求的内容(将元素拖到手风琴外).

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天全站免登陆