Css 在移动浏览器上隐藏JqueryUI对话框窗口
我有一个jqueryUI对话框窗口,在pageload时打开。非常简单,非常容易:Css 在移动浏览器上隐藏JqueryUI对话框窗口,css,jquery-ui,media-queries,Css,Jquery Ui,Media Queries,我有一个jqueryUI对话框窗口,在pageload时打开。非常简单,非常容易: <script> $(function() { $( "#dialog-modal" ).dialog({ dialogClass: 'fixed-dialog', resizable: false, width: 580, top: 200, modal: true }); }); </script> <div class="dia
<script>
$(function() {
$( "#dialog-modal" ).dialog({
dialogClass: 'fixed-dialog',
resizable: false,
width: 580,
top: 200,
modal: true
});
});
</script>
<div class="dialog-wrapper"></div>
<script>
$('.dialog-wrapper')
.html('<div id="dialog-modal" class="dialog-right bigdialog" title="Click to close"><a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YNQGF43QJK2VG" target="_blank"><img class="overlay-image" src="/images/digger-24k-anim.gif"></a></div>');
</script>
$(函数(){
$(“#对话框模式”).dialog({
dialogClass:“修复对话框”,
可调整大小:false,
宽度:580,
前200名,
莫代尔:对
});
});
$(“.dialog wrapper”)
.html(“”);
问题是,我想在移动浏览器上隐藏它,但它根本不起作用。任何使用css媒体查询显示的尝试:在某些监视器分辨率上没有显示,因为jQueryUI上的元素样式是display:block
是否有其他方法可以实现此目的?检查屏幕的大小。如果它小于最小大小,则跳过对话框
if($(window).height() >= miniumHeight && $(window).width() >= minimumWidth) {
/*Show Dialog Box*/
} else {
/*Do Something Else*/
}
另一种方法是css可见性:隐藏代码>