Javascript Fancyapps覆盖层未显示
我们在页面加载后动态加载fancybox css文件,并尝试打开带有覆盖活动和自定义html内容的fancybox 有时覆盖层不会出现。若我们试图延迟打开fancybox,并没有覆盖的概率会降低,但它并没有完全消失 我已经为此问题创建了一个问题: 这就是我们初始化fancybox的方式:Javascript Fancyapps覆盖层未显示,javascript,fancybox,overlay,fancybox-2,Javascript,Fancybox,Overlay,Fancybox 2,我们在页面加载后动态加载fancybox css文件,并尝试打开带有覆盖活动和自定义html内容的fancybox 有时覆盖层不会出现。若我们试图延迟打开fancybox,并没有覆盖的概率会降低,但它并没有完全消失 我已经为此问题创建了一个问题: 这就是我们初始化fancybox的方式: var fancyboxParams = { minHeight: 10, width: params.width || 'auto', height: params.height || 'auto
var fancyboxParams = {
minHeight: 10,
width: params.width || 'auto',
height: params.height || 'auto',
autoSize: false,
autoWidth: params.width ? false : true,
autoHeight: params.height ? false : true,
autoHide: params.autoHide,
topRatio: params.topRatio || topRatio,
leftRatio: params.leftRatio || leftRatio,
title: title,
helpers: {
title: (title && params.windowStyle !== 'seamless') ? {
type: 'inside',
position: 'top'
} : null,
overlay: (params.overlay != "false") ? {} : null
},
content: notificationBody,
fixed: false, // HADDITION - scroll with the page 16.10.2015
wrapCSS: (params.cssClass || "") + " " + "fancybox-" + (params.windowStyle || "seamless"),
beforeShow: function () {
cssCode && $('<style />').html(params.cssCode).prependTo(this.outer);
try {
javascriptCode && eval(javascriptCode);
beforeShow.call(this); // change context
}
catch (err) {
$.fancybox.close(true);
}
},
afterClose: function () {
$(".fancybox-segmentify").remove();
}
};
if (params.isModal == 'true') {
fancyboxParams.closeBtn = false;
fancyboxParams.closeClick = false;
fancyboxParams.keys = null;
if (fancyboxParams.helpers.overlay) {
fancyboxParams.helpers.overlay.closeClick = false;
}
}
$.fancybox(fancyboxParams);
var fancyboxParams={
身高:10,
宽度:params.width | |“自动”,
高度:params.height | |“自动”,
自动调整大小:false,
autoWidth:params.width?false:true,
自动高度:参数高度?错误:正确,
自动隐藏:params.autoHide,
topRatio:参数topRatio | | topRatio,
leftRatio:params.leftRatio | | leftRatio,
标题:标题,,
助手:{
title:(title&¶ms.windowStyle!=“无缝”){
键入:“内部”,
位置:'顶部'
}:null,
覆盖:(params.overlay!=“false”)?{}:null
},
内容:通知机构,
修正:false,//HADDITION-滚动页面16.10.2015
wrapCSS:(params.cssClass | | |“”)+“+”fancybox-“+”(params.windowStyle | | |“无缝”),
beforeShow:函数(){
cssCode&&$('').html(params.cssCode.prependTo(this.outer);
试一试{
javascriptCode&&eval(javascriptCode);
beforeShow.call(this);//更改上下文
}
捕捉(错误){
$.fancybox.close(真);
}
},
后关闭:功能(){
$(“.fancybox segmentify”).remove();
}
};
if(params.isModal=='true'){
fancyboxParams.closeBtn=false;
fancyboxParams.closeClick=false;
fancyboxParams.keys=null;
if(fancyboxParams.helpers.overlay){
fancyboxParams.helpers.overlay.closeClick=false;
}
}
$.fancybox(fancyboxParams);
您找到解决方案了吗?您找到解决方案了吗?