为什么jQuery UI 1.10删除jquery对话框zIndex选项? [英] Why jQuery UI 1.10 remove jquery dialog zIndex option?

查看:154
本文介绍了为什么jQuery UI 1.10删除jquery对话框zIndex选项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现最新版本的jQuery UI(1.10)删除了 zIndex 选项。而且它在jQuery网站上得到确认。

I found the latest version of jQuery UI(1.10) remove the zIndex option. And it's confirmed on the jQuery website.

真的让我震惊了请考虑以下情况:

It really shocked me. Please think about this:

当我们有一个jqgrid,并使用 editrow() addrow()打开一个编辑对话框来编辑一些东西,里面有很多字段,其中一些有自定义的事件,比如当你点击它的时候,它会显示另一个jQuery对话框显示一些要查看的树视图项目。

When we have an jqgrid, and use editrow() or addrow() to open a edit dialog to edit something, and there are many fields inside, some of which have self-defined event, such as, when you click it, it will show another jQuery dialog to show some treeview items to chose.

在jQuery UI 1.9(包括)下,您可以设置jQuery对话框的 zIndex 选项大于jqgrid编辑对话框(jqgrid编辑对话框支持集 zIndex ),所以jQuery对话框始终是可以看到和使用的。

Under jQuery UI 1.9 (included), you can set the jQuery dialog's zIndex option to bigger than the jqgrid edit dialog's (jqgrid edit dialog support set zIndex), so the jQuery dialog always be upon and could be seen and used.

在jQuery UI 1.10下,您无法设置 zIndex ,所以jQuery对话框始终位于jqgrid编辑对话框的后面。

Under jQuery UI 1.10, you cant set zIndex, so the jQuery dialog is always behind the jqgrid edit dialog.

我认为这样的场景很常见。

I think such scene is very common.

为什么jQuery UI 1.10删除jQuery对话框 zIndex 选项?当有多个对话框时,如何控制 z-index

Why jQuery UI 1.10 remove jQuery dialog zIndex option? How to control the z-index order when there is more than one dialog?

推荐答案

我想我明白你的问题。 jQuery UI对话框的CSS z-index不够高,无法始终显示您的内容。这是一个快速修复:

I think I understand your problem. The CSS z-index for the jQuery UI dialog is not high enough to always show above your content. Here's a quick fix:

/* A class used by the jQuery UI CSS framework for their dialogs. */
.ui-front {
    z-index:1000000 !important; /* The default is 100. !important overrides the default. */
}

这篇关于为什么jQuery UI 1.10删除jquery对话框zIndex选项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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