jqModal 对话框始终处于叠加状态
我有以下代码,但我束手无策,因为对话框总是出现在覆盖层下。任何建议将不胜感激:
<head runat="server">
<title></title>
<link href="../Styles/jqModal.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#shift-edit-popup
{
display: none;
}
</style>
<script src="../Scripts/jquery-1.4.2.js" type="text/javascript"></script>
<script src="../Scripts/jqModal.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("#shift-edit-popup").jqm({
toTop: true
}).jqmAddTrigger("#show-button");
});
</script>
</head>
<body>
<form id="form" runat="server">
<input id="show-button" type="button" value="Show" />
<div id="shift-edit-popup">
<div>
<asp:Label ID="resourceLabel" runat="server" AssociatedControlID="resourceList">Resource:</asp:Label>
<asp:DropDownList ID="resourceList" runat="server" DataTextField="Name" DataValueField="ResourceId" Width="120px">
</asp:DropDownList>
</div>
</div>
</body>
I have the following code, and am at my wit's end because the dialog always appears under the overlay. Any advice will be most appreciated:
<head runat="server">
<title></title>
<link href="../Styles/jqModal.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#shift-edit-popup
{
display: none;
}
</style>
<script src="../Scripts/jquery-1.4.2.js" type="text/javascript"></script>
<script src="../Scripts/jqModal.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$("#shift-edit-popup").jqm({
toTop: true
}).jqmAddTrigger("#show-button");
});
</script>
</head>
<body>
<form id="form" runat="server">
<input id="show-button" type="button" value="Show" />
<div id="shift-edit-popup">
<div>
<asp:Label ID="resourceLabel" runat="server" AssociatedControlID="resourceList">Resource:</asp:Label>
<asp:DropDownList ID="resourceList" runat="server" DataTextField="Name" DataValueField="ResourceId" Width="120px">
</asp:DropDownList>
</div>
</div>
</body>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
从我所看到和尝试的情况来看,您需要在对话框 div 上使用包含的 jqmWindow 类并删除此内容:
您的代码应该如下所示:(
您只需要相应地更改脚本和 css 引用)
From what I saw and tried you need to use the included jqmWindow class on your dialog div and drop the this:
Your code should look something like this:
(You just need to change the script and css references accordinly)
我相信你需要设置shift-edit-popup的位置:
I believe you need to set position of the shift-edit-popup:
您使用哪个版本的 jqModal.js?
来自 http://dev.iceburg.net/jquery/jqModal/ 的最新官方版本与 jQuery 1.4.x 不兼容(请参阅 http: //forum.jquery.com/topic/jqdnr-dragging-problem-with-jquery-1-4 和 http://www.trirand.com/blog/?page_id=393/bugs/jqgrid-jquery-1-4/) 。
如果在您的版本中,“$()”存在于 jqModal.js 中,则应将其替换为“$(document)”。您还可以下载固定版本作为 jqGrid 包的一部分:http://www.trirand。 com/blog/?page_id=6。
Which version of jqModal.js do you use?
The last official version from http://dev.iceburg.net/jquery/jqModal/ is not compatible with jQuery 1.4.x (see http://forum.jquery.com/topic/jqdnr-dragging-problem-with-jquery-1-4 and http://www.trirand.com/blog/?page_id=393/bugs/jqgrid-jquery-1-4/).
If in your version "$()" exist inside of jqModal.js, it should be replaced with "$(document)". You can also download fixed version as a part of jqGrid package: http://www.trirand.com/blog/?page_id=6.
检查叠加层和模态框的 z-index 值。
Check the z-index values of the overlay and the modal box.
也许这会有助于阅读:了解 z-index
Perhaps this will be helpful reading: Understanding z-index
不久前我遇到了这样的问题。尝试将 DOCTYPE 更改为:
I ran into a problem like this not to long ago. Try changing the DOCTYPE to this: