【发布时间】:2015-03-19 05:48:20
【问题描述】:
试图让我的画廊正常运行。现在我正在使用 isotope.js 过滤我的画廊,并使用 photoswipe.js 作为灯箱。
我的问题是,即使它正确过滤了图库,photoswipe 仍然显示所有图像。
我发现了这个:
// Use the shinybox only for visible elements
var shinyboxInstance = $(".shinybox-isotope:not(.isotope-hidden .shinybox-isotope)").shinybox();
// Callback function that fire the refresh method, once the animation is finished
onAnimationCompleted = function(){
shinyboxInstance.refresh();
};
我有它,所以当一个项目被隐藏时,.isotope-hidden 类被添加到元素中,所以我到了一半。我只需要适当的脚本来强制 photoswipe 只显示过滤后的图像。
任何帮助将不胜感激。谢谢!
【问题讨论】:
-
您找到解决方案了吗?我没有使用同位素,而是使用 shuffle.js,但我认为您的解决方案也可以满足我的需要。谢谢。
标签: javascript jquery gallery photoswipe