有没有办法在移动设备中缩放/缩放 jquery 对话框?
<meta name="viewport" content="initial-scale=1" />
这是我的对话框 jquery
(function($) {
$(document).ready(function() {
redirect = wyConfirm('Error message', 'Alert');
});
/*jquery ui dialog for error message alerts*/
var wyAlertDialog = null;
window.wyConfirm = function(msg, title) {
if (!title) {
title = 'Message';
}
if ($('#wyalert_div').length == 0) {
$('body').append('<div style="display:none;"><div id="wyalert_div"> </div></div>');
wyConfirmDialog = $("#wyalert_div");
wyConfirmDialog.dialog({
autoOpen: true,
modal: true,
resizable: false,
zIndex: 2000,
OpacityOverlay: 1,
height: 'auto',
buttons: {
"Confirm": function() {
$(this).dialog("close");
return true;
},
"Cancel": function() {
$(this).dialog("close");
return false;
}
}
});
}
$('#wyalert_div').html(msg);
wyConfirmDialog.dialog('option', 'title', title);
wyConfirmDialog.dialog('open');
return false;
}
})(jQuery);
但这不适用于所有浏览器,尤其是 android 浏览器。