WordPress 页面上的 Galleriffic 和多个画廊
我想我已经接近解决这个问题,并且需要一些帮助才能使其正常工作。我正在使用从 WordPress 帖子 ID 号动态生成的 ID 来创建独特的 Galleriffic 画廊。我的脚本似乎只获取一个唯一的选择器,而不是任何其他选择器。
您可以在此处查看该页面,
这是galleriffic初始化代码:
var galleryId = $('.gallery').attr('id');
var slideId = $('#'+galleryId+' > div');
var currentId = $('.thumbs_group').attr('id');
$('#'+galleryId).galleriffic('#'+currentId, {
imageContainerSel: slideId
});
同样,此代码仅影响第一个画廊而不是第二个画廊。
任何想法将不胜感激。谢谢。
I think I'm close to figuring this out and would like some help to get this working properly. I am using dynamically generated IDs from Wordpress Post ID numbers to create unique Galleriffic galleries. My script seems to be grabbing only one unique selector and not any other.
You can see the page here
Here is the galleriffic init code:
var galleryId = $('.gallery').attr('id');
var slideId = $('#'+galleryId+' > div');
var currentId = $('.thumbs_group').attr('id');
$('#'+galleryId).galleriffic('#'+currentId, {
imageContainerSel: slideId
});
Again, this code is only affecting the first gallery and not the second gallery.
Any ideas would be appreciated. Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您仅将该函数应用于一个 galleryID,请尝试
更新代码: 将上面的所有代码替换为:
you are only applying the function to one galleryID, try
Updated code: replace all your code above with this: