jquery 可排序处理 IE 与 Firefox

发布于 2024-08-05 06:41:41 字数 466 浏览 2 评论 0原文

我正在尝试使用 jquery 来实现 portlet/widget 样式的界面,有 3 列,并在它们内部和之间进行拖放。除了下面的小错误之外,它几乎完全可以工作。 portlet 有一个标头 h2,我已将其设置为可排序选项中的句柄。在 Firefox 和 Chrome 中,这完全按照预期工作。在 IE 中,只有 h2 的文本充当句柄,直到我实际移动 portlet 一次。那么整个标头的行为就如预期的那样。这是一个错误,还是我错过了什么?我的代码如下:

    $('.column').sortable({
        connectWith: '.column',
        handle: 'h2',
        cursor: 'move',
        placeholder: 'placeholder',
        forcePlaceholderSize: true,
        opacity: 0.4
    })

i'm trying to use jquery to implement a portlet/widget style interface, with 3 columns and drag and drop within and between them. it's working almost completely, except for the following little bug. the portlets have a header, h2, that i've set as the handle in my sortable options. in firefox and chrome, this is working exactly as expected. in IE, only the text of h2 serves as a handle until i actually move the portlet once. then the entire header behaves as expected. is this a bug, or am i missing something? my code is as follows:

    $('.column').sortable({
        connectWith: '.column',
        handle: 'h2',
        cursor: 'move',
        placeholder: 'placeholder',
        forcePlaceholderSize: true,
        opacity: 0.4
    })

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

枕梦 2024-08-12 06:41:41

让它工作 - 必须设置缩放:1;在用作句柄的类的 css 上。

got it working - had to put a zoom: 1; on the css for the class that serves as the handle.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文