JQuery 插件组合问题:Fancybox 和 ContextMenu

发布于 2024-09-07 06:18:02 字数 443 浏览 0 评论 0原文

我使用了两个流行的插件,大部分都取得了成功:

http://www.trendskitchens .co.nz/jquery/contextmenu/

http://fancybox.net/

它们都工作得非常好。但是,我似乎无法在 fancybox 内使用上下文菜单。正常的右键菜单被抑制,所以我相信某处存在 z-index 冲突。在检查和更新样式之后,我仍然无法在 fancybox 内获得上下文菜单。

然而,它们单独工作都很好。有人成功地结合了这些或遇到类似的问题吗?

谢谢!

I'm using two popular plugins with success for the most part:

http://www.trendskitchens.co.nz/jquery/contextmenu/

http://fancybox.net/

They both work fantastically. However, I cannot seem to get context menus working inside a fancybox. The normal right click menu is suppressed, so I'm led to believe there is a z-index clash somewhere. After checking and updating styles though I still can't get a context menu inside a fancybox.

They both work great separately however. Anyone combine these successfully or experience similar issues?

Thanks!

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

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

发布评论

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

评论(2

与君绝 2024-09-14 06:18:02

您很可能(没有您的代码,我只能猜测)需要在 fancybox onComplete 回调内部调用 contextmenu 插件,

例如:

$.fancybox({
    //other initialization options
    // ...
    // ...
    'onComplete':function(){
        //call the context menu plugin here
    }
});

You will most likely (without your code I can only guess) need to call the contextmenu plugin inside of the fancybox onComplete callback

For example:

$.fancybox({
    //other initialization options
    // ...
    // ...
    'onComplete':function(){
        //call the context menu plugin here
    }
});
你是我的挚爱i 2024-09-14 06:18:02

调整你的CSS文件可能不会做任何事情,因为ContextMenu直接在它的js中添加'zIndex:500'和zIndex:499'。将其调整为 99999 和 99998 效果很好。

很棒的插件。

Adjusting your css files will do nothing probably as ContextMenu is adding 'zIndex: 500' and zIndex: 499' directly in it's js. Adjusting this to 99999 and 99998 worked perfectly.

Great plugins.

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