我已经被困了很长时间,我需要从jquery中禁用或消除模态对话框的叠加层(ui-widget-overlay),第一个问题是叠加层出现在我的对话框前面而我我已经尝试了所有的东西,把它放在后面没有任何作用,尝试了所有的z-index那里的答案,没有发生任何事情,所以我厌倦了它,我只是想删除它。
这是代码:
<script>
UINestable.init();
$(function() {
$( "#dragQueen" ).dialog({
closeOnEscape: true,
modal: false,
open: function () {
$(".ui-widget-overlay").remove();
$('.modal-dialog').addClass("fixed");
$('.ui-dialog-title').css("display","none");
$('.ui-dialog-titlebar-close').css("display","none");
},
});
});
</script>
<style>
.fixed {
position: absolute !important;
padding: 0px !important;
width: 300% !important;
height: auto !important;
margin-left: 25% !important;
margin-right: 25% !important;
z-index:9999 !important;
}
</style>
请求有人帮助我:
谢谢,
答案 0 :(得分:0)
<script>
function openPopup() {
$("#sth").dialog("open");
}
$(document).ready(function () {
var dialog;
dialog = $("#sth").dialog({
autoOpen: false,
width: 500,
height: 800,
resizable: false,
modal: true,
open: function () {
$('.ui-widget-overlay').css('position', 'fixed');
$('.ui-dialog').css('z-index', 103);
$('.ui-widget-overlay').css('z-index', 102);
},
close: function () {
$('.ui-widget-overlay').css('position', 'absolute');
}
});
$(".ui-dialog-titlebar").hide();//hide title bar.
});
</script>
html:
<td>
@Ajax.ActionLink("link text", "action Name", "myController", null,
new AjaxOptions
{
HttpMethod = "GET",
InsertionMode = InsertionMode.Replace,
UpdateTargetId = "sth",
OnSuccess = "openPopup",
},
null
)
</td>