我在jQuery对话框中遇到关闭按钮的问题。不知何故,按钮的标题没有被隐藏并叠加在图标pic上。
我检查元素,这就是我得到的pic
_Layout.cshtml
中呈现的内容$('#<%= chk1.ClientID%>').on('switchChange.bootstrapSwitch', function (event, state) {
if (state) { //if chk1's switch is set to true
$('#<%= chk2.ClientID%>').bootstrapSwitch('disabled', true);
}
else {
$('#<%= chk2.ClientID%>').bootstrapSwitch('disabled', false);
}
});
以下是我设置对话框的方法:
<head>
<link href="/Content/Site.css" rel="stylesheet"/>
<link href="/Content/datepicker.css" rel="stylesheet"/>
<link href="/Content/AboutContactUs.css" rel="stylesheet"/>
<link href="/Content/userPage.css" rel="stylesheet"/>
<link href="/Content/home.css" rel="stylesheet"/>
<link href="/Content/themes/base/core.css" rel="stylesheet"/>
<link href="/Content/themes/base/resizable.css" rel="stylesheet"/>
<link href="/Content/themes/base/selectable.css" rel="stylesheet"/>
<link href="/Content/themes/base/accordion.css" rel="stylesheet"/>
<link href="/Content/themes/base/autocomplete.css" rel="stylesheet"/>
<link href="/Content/themes/base/button.css" rel="stylesheet"/>
<link href="/Content/themes/base/dialog.css" rel="stylesheet"/>
<link href="/Content/themes/base/slider.css" rel="stylesheet"/>
<link href="/Content/themes/base/tabs.css" rel="stylesheet"/>
<link href="/Content/themes/base/progressbar.css" rel="stylesheet"/>
<link href="/Content/themes/base/theme.css" rel="stylesheet"/>
</head>
<body>
....
<script src="/Scripts/jquery-3.1.0.js"></script>
<script src="/Scripts/ajax-popup.js"></script>
<script src="/Scripts/moment.js"></script>
<script src="/Scripts/bootstrap.js"></script>
<script src="/Scripts/bootstrap-datepicker.js"></script>
<script src="/Scripts/bootstrap-datetimepicker.js"></script>
<script src="/Scripts/respond.js"></script>
<script src="/Scripts/jquery-ui-1.12.0.js"></script>
</body>
答案 0 :(得分:0)
使用closeText选项摆脱了这种奇怪的行为......
$("#addSuccessDialog").dialog({
closeText:"",
height: 100,
width: 200,
autoOpen: false,
modal: true
});