Jquery DataTables插件更改标题&;页脚背景色
我使用DataTables jQuery插件来显示网格。我有一个模式弹出窗口,它改变了整个表单的背景色,并且意外地改变了前面提到的表的页眉和页脚背景色的背景色。这是用于初始化弹出窗口的代码:Jquery DataTables插件更改标题&;页脚背景色,jquery,asp.net-mvc,datatables,Jquery,Asp.net Mvc,Datatables,我使用DataTables jQuery插件来显示网格。我有一个模式弹出窗口,它改变了整个表单的背景色,并且意外地改变了前面提到的表的页眉和页脚背景色的背景色。这是用于初始化弹出窗口的代码: var modalBackground = $("#modalBackground"); var Notifications_ArchiveHolder = $("#Notifications_ArchiveHolder"); var Notifications_ShowArchivePopupHolder
var modalBackground = $("#modalBackground");
var Notifications_ArchiveHolder = $("#Notifications_ArchiveHolder");
var Notifications_ShowArchivePopupHolder = $("#Notifications_ShowArchivePopupHolder");
var ArchiveURL = "@Url.Action("Archive")";
var ShowArchiveUrl = "@Url.Action("ShowArchive")";
function ShowArchivePopup() {
$.get(ArchiveURL, function (content) {
if (Notifications_ArchiveHolder.html().length <= 10) {
Notifications_ArchiveHolder.html(content);
InitArchivePopup();
}
})
}
function InitArchivePopup() {
modalBackground.show();
//set up positon
var h = $(window).height();
var w = $(window).width();
var hh = Notifications_ArchiveHolder.height();
var hw = Notifications_ArchiveHolder.width();
var posx = (h / 2) - 100;
var posy = (w / 2) - 200;
Notifications_ArchiveHolder.css("position", "fixed");
Notifications_ArchiveHolder.css("top", posx);
Notifications_ArchiveHolder.css("left", posy);
Notifications_ArchiveHolder.show();
$("body").css("overflow", "hidden");
}
var modalBackground=$(“#modalBackground”);
var通知\档案持有人=$(“通知\档案持有人”);
var通知(u showArchivePopUploader=$(“#通知_showArchivePopUploader”);
var ArchiveURL=“@Url.Action(“存档”)”;
var ShowArchiveUrl=“@Url.Action(“ShowArchive”)”;
函数ShowArchivePopup(){
$.get(ArchiveURL,函数(内容){
如果(Notifications_ArchiveHolder.html().length我发现了问题(在一些帮助下):我在模式弹出窗口中引用了jQuery-UI.css,这导致数据表的属性被覆盖。非常奇怪
<div id="Notifications_ArchiveHolder" style="background-color: white; display: none; z-index: 9999;"></div>
<div id="modalBackground" class="graphicScreen" style="display: none; position: fixed; top: 0px; left: 0px;"></div>
.graphicScreen
{
position: fixed;
width: 100%;
height: 100%;
margin: 0;
padding: 50px;
background-color: #878786;
z-index: 9990;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
filter: alpha(opacity=30);
-moz-opacity: 0.3;
-khtml-opacity: 0.3;
opacity: 0.3;
}