layui 弹出层监听

if ($.PublicIsMobile($(window).width()))
{
var layerInitWidth = $("#layui-layer" + ly_dtxm).width();
var layerInitHeight = $("#layui-layer" + ly_dtxm).height();

var docWidth = $(document).width();
var docHeight = $(document).height();
var minWidth = layerInitWidth > docWidth ? docWidth : layerInitWidth;
var minHeight = layerInitHeight > docHeight ? docHeight : layerInitHeight;
parent.layer.style(ly_dtxm, {
//top: 0,
width: minWidth,
height: 20
});
}
else
{
var layerInitWidth = $("#layui-layer" + ly_dtxm).width();
var layerInitHeight = $("#layui-layer" + ly_dtxm).height();
parent.layer.style(ly_dtxm, {
//top: 0,
width: layerInitWidth,
height: layerInitHeight
});
}

猜你喜欢

转载自www.cnblogs.com/sdya/p/9293032.html