Meteor 流星及;放大弹出窗口:Can';不要关闭库弹出窗口
我正在尝试将lightbox与我的Meteor应用程序一起使用。我的问题是,当我启动库时,我无法关闭库弹出窗口。点击[x]按钮或点击背景没有效果。否则,灯箱似乎工作正常。使用单个弹出窗口可以按预期工作(包括关闭),但画廊不能。很难看到发生了什么,因为它使Chrome inspector崩溃。有时我会看到以下错误:Meteor 流星及;放大弹出窗口:Can';不要关闭库弹出窗口,meteor,magnific-popup,Meteor,Magnific Popup,我正在尝试将lightbox与我的Meteor应用程序一起使用。我的问题是,当我启动库时,我无法关闭库弹出窗口。点击[x]按钮或点击背景没有效果。否则,灯箱似乎工作正常。使用单个弹出窗口可以按预期工作(包括关闭),但画廊不能。很难看到发生了什么,因为它使Chrome inspector崩溃。有时我会看到以下错误: RangeError: Maximum call stack size exceeded 如果我在下面的代码中设置gallery=false,弹出窗口可以正常工作,但很明显我失去了g
RangeError: Maximum call stack size exceeded
如果我在下面的代码中设置gallery=false,弹出窗口可以正常工作,但很明显我失去了gallery功能
多谢各位
html:
js:
Template.itemPage.rendered=function(){
console.log(“呈现的itemPage”);
$('#itemTiles').imagesLoaded(函数(){
$('.popup gallery').magnificPopup({
代表:“a”,
键入:“图像”,
t加载:“正在加载图像#%curr%…”,
mainClass:'mfp img mobile',
画廊:{
启用:对,
NavigateByMgClick:true,
预加载:[0,1]//将在当前映像之前预加载0,在当前映像之后预加载1
},
图片:{
恐怖:“无法加载。”,
标题RC:功能(项目){
返回item.el.attr('title')+'by Test';
}
}
});
..
}
我已经临时部署了该网站,以备不时之需。这是我第一次涉足web开发,请原谅代码混乱!)尝试更新jQuery/Zepto/放大弹出窗口,或提供指向有问题页面的链接。非常感谢您提供的优秀插件!我肯定我做了一些奇怪的事情。我相信我有最新的jQuery/放大弹出窗口,所以我不确定我做错了什么。我已在此处部署了网站:。我是webdev的新手,请原谅错误代码ry,为了解释,你需要点击“Maehama海滩”链接到详细页面。在该页面上,将加载一堆缩略图以启动gallery。谢谢。您已打包并缩小了所有文件,很难对此进行调试。jQuery也不在最新版本上。请尝试在JSFIDLE上隔离此问题,或排除所有第三方脚本。哦,对不起,我在没有de的情况下部署了它错误标志。我现在用调试标志重新部署了它,所以它不应该缩小。我也会尝试你的建议!谢谢
<div class="popup-gallery">
<a href="{{imageURL}}">
<img src="{{imageURL}}" alt="">
</a>
<a href="{{imageURL}}">
<img src="{{imageURL}}" alt="">
</a>
<a href="{{imageURL}}">
<img src="{{imageURL}}" alt="">
</a>
</div>
Template.itemPage.rendered = function() {
console.log("itemPage rendered");
$('#itemTiles').imagesLoaded(function() {
$('.popup-gallery').magnificPopup({
delegate: 'a',
type: 'image',
tLoading: 'Loading image #%curr%...',
mainClass: 'mfp-img-mobile',
gallery: {
enabled: true,
navigateByImgClick: true,
preload: [0,1] // Will preload 0 - before current, and 1 after the current image
},
image: {
tError: '<a href="%url%">The image #%curr%</a> could not be loaded.',
titleSrc: function(item) {
return item.el.attr('title') + '<small>by Test</small>';
}
}
});
..
}