如何在移动设备中缩放jquery对话
有没有办法在移动设备中缩放jquery对话框如何在移动设备中缩放jquery对话,jquery,jquery-ui,mobile,dialog,Jquery,Jquery Ui,Mobile,Dialog,有没有办法在移动设备中缩放jquery对话框 <meta name="viewport" content="initial-scale=1" /> 这是我的对话框jquery (function($) { $(document).ready(function() { redirect = wyConfirm('Error message', 'Alert'); }); /*jquery ui dialog for error message aler
<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);
(函数($){
$(文档).ready(函数(){
redirect=wyConfirm('Error message','Alert');
});
/*错误消息警报的jquery ui对话框*/
var wyartdialog=null;
window.wyConfirm=函数(消息,标题){
如果(!标题){
标题='消息';
}
如果($('#wyalert_div')。长度==0){
$('body')。追加('');
wyConfirmDialog=$(“#wyalert_div”);
wyConfirmDialog.dialog({
自动打开:对,
莫代尔:是的,
可调整大小:false,
zIndex:2000,
不透明覆盖:1,
高度:“自动”,
按钮:{
“确认”:函数(){
$(此).dialog(“关闭”);
返回true;
},
“取消”:函数(){
$(此).dialog(“关闭”);
返回false;
}
}
});
}
$('wyalert_div').html(msg);
对话框('option','title',title);
对话框(“打开”);
返回false;
}
})(jQuery);
但这并不是在所有浏览器中都有效,尤其是android浏览器 在Android应用程序的web视图/浏览器中?你能同时显示你的jQuery对话框吗?阅读@ShivanRaptor,OP想在jQuery手机上实现这一点,我想不是在Android上。他特别提到了Android浏览器这不是Android应用程序,一个移动网站