JQuery UI对话框无法在iPad中打开。我不确定它是否会第二次打开,因为我无法刷新页面。
这就是我在做什么。
$(document).ready(function() {
$('#dialog').dialog({autoOpen: false, resizable: false, modal: true});
$('body').append('<div id="popup" style="overflow: hidden; padding: 5px; background-color: #ffffff;"></div>');
$('#popup').dialog({
autoOpen: false,
resizable: false,
draggable: false,
width: 720,
modal: true,
open: function(event, ui) {
$('.ui-dialog').css('z-index', 10001);
$('.ui-widget-overlay').css('z-index', 10000);
},
close: function(event, ui) {
$(this).dialog('destroy').remove();
},
position: {
my: 'top',
at: 'top+10%',
of: window
},
title: "Instructions"
}).html('<img id="ins-image" src="images/Instructions.png" width="700" height="472"></img>').dialog('open');
)};
答案 0 :(得分:1)
试试这个我已经使用这个和它的工作正常的浏览器和ipad,iphone aslo android
$("<div id='DialogPopup'></div>")
.dialog({
title: resetPassTitle,
resizable: true,
dialogClass: "no-close",
position: { my: "center", at: "center", of: "#myTab" },
show: {
effect: "scale",
duration: 500
},
hide: {
effect: "clip",
duration: 500
},
close: function () {
$(this).remove();
},
modal: true,
width: ($(window).width() <= 720) ? 250 : 500
})
.load('/mycontroller/ResetPassword?contactID=' + id + '&userName=' + UserName + '');