jQueryUI 模态对话框不显示关闭按钮 (x)
问题描述:
我在我的 ASP .NET MVC 3 应用程序中使用了 jQuery 模式对话框.除了右上角没有显示关闭按钮之外,它工作正常.我该如何添加?
I'm using a jQuery modal dialog in my ASP .NET MVC 3 application. It works fine except for that there is no close button showing in the top right corner. How can I add this?
$("#dialog-modal").dialog({
modal: true,
autoOpen: false,
buttons: {
Ok: function () {
$(this).dialog("close");
}
}
});
答
在对话框的右上角,将鼠标悬停在按钮应该的位置上,看看是否有效果(按钮悬停).尝试单击它并查看它是否关闭.如果它确实关闭了,那么您只是缺少软件包下载附带的图像精灵.
In the upper right corner of the dialog, mouse over where the button should be, and see rather or not you get some effect (the button hover). Try clicking it and seeing if it closes. If it does close, then you're just missing your image sprites that came with your package download.