fancybox手动调用添加以前的值
我几天前刚刚询问过fancybox手动调用特定目标
现在我还有一个问题。我喜欢实现多个 fancybox 画廊。第一个画廊效果很好。但是,当我包含第二个画廊(例如代码:)时,
$("#manual1").click(function() {
$.fancybox([
'http://farm5.static.flickr.com/4044/4286199901_33844563eb.jpg',
'http://farm3.static.flickr.com/2687/4220681515_cc4f42d6b9.jpg',
{
'href' : 'http://farm5.static.flickr.com/4005/4213562882_851e92f326.jpg',
'title' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit'
}
], {...
});
});
$("#manual2").click(function() {
$.fancybox([
'http://farm5.static.flickr.com/4044/4286199901_33844563eb.jpg',
'http://farm3.static.flickr.com/2687/4220681515_cc4f42d6b9.jpg',
{
'href' : 'http://farm5.static.flickr.com/4005/4213562882_851e92f326.jpg',
'title' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit'
}
], {...
});
});
第二个画廊包含第一个画廊的图片。因此,在这个例子中,我将有一个包含 3 张图片的第一个画廊 (#manual1) 和一个包含 6 张图片的第二个画廊 (#manual2)。但我喜欢第二张中只有 3 张照片。 (第三个更糟糕)。
我该如何解决这个问题? $.fancybox().removeData();
的效果不如 $('something_in_here').fancybox(
没有帮助。
I just asked several days ago about fancybox manual call to a specific target
now I have a further problem. I like to implement more than one fancybox gallery. The first gallery works well. But when I include a second one (e.g. code:)
$("#manual1").click(function() {
$.fancybox([
'http://farm5.static.flickr.com/4044/4286199901_33844563eb.jpg',
'http://farm3.static.flickr.com/2687/4220681515_cc4f42d6b9.jpg',
{
'href' : 'http://farm5.static.flickr.com/4005/4213562882_851e92f326.jpg',
'title' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit'
}
], {...
});
});
$("#manual2").click(function() {
$.fancybox([
'http://farm5.static.flickr.com/4044/4286199901_33844563eb.jpg',
'http://farm3.static.flickr.com/2687/4220681515_cc4f42d6b9.jpg',
{
'href' : 'http://farm5.static.flickr.com/4005/4213562882_851e92f326.jpg',
'title' : 'Lorem ipsum dolor sit amet, consectetur adipiscing elit'
}
], {...
});
});
the second gallery includes the pictures from the first. So in this example I will have a first gallery (#manual1) with 3 pictures and a second gallery (#manual2) with 6 pictures. But I like to have only 3 pics in the second one. (And a third one is even worse).
How can I solve this problem? $.fancybox().removeData();
doesn't work as well as $('something_in_here').fancybox(
does not help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您复制相同的代码并仅更改选择器,当然您将获得相同的信息。
您可以在此处定义每个画廊的图片,
因此请相应地更改每个画廊的路径
If you copy the same code and only change the selector, of course you will have the same information.
Here is where you define what pictures for each gallery
so change the path accordingly for each gallery
只是在这里猜测,但范围没有定义......如果你尝试像
$(this).fancybox([
Just guessing here, but the scope isn't defined...what if you tried something like
$(this).fancybox([