如何在保留相同花式框设置的同时点击'.fancybox-button'来打开'.fancybox'打开的相同图画?FancyBox从多个链接打开同一个图库
<div class="custom-thumbnail"><a class="fancybox" rel="group" href="Gallery/Image3.jpg"><img title="Bird Caption" src="Gallery/_t/testImage3_jpg.jpg"></a></div>
<div class="custom-caption"><a class="fancybox-button" rel="fancybox-button" href="Gallery/testImage3.jpg">Click here to open gallery</a></div>
这里是我的代码来管理的fancybox属性
jQuery(".fancybox").fancybox({
maxWidth : 800,
maxHeight : 600,
fitToView : false,
width : '100%',
height : '100%',
title: this.title,
wmode: 'transparent',
allowfullscreen : 'true',
allowscriptaccess : 'always',
beforeLoad: function() {
this.title = jQuery(this.element).find('img').attr('title');
},
next : {
13 : 'left', // enter
34 : 'up', // page down
39 : 'left', // right arrow
40 : 'up' // down arrow
},
prev : {
8 : 'right', // backspace
33 : 'down', // page up
37 : 'right', // left arrow
38 : 'down' // up arrow
},
close : [27], // escape key
helpers: {
title : {
type : 'inside' // 'float', 'inside', 'outside' or 'over'
},
overlay : {
showEarly : false
},
thumbs : {
width: 50,
height: 50
}
}
});
复制对话框窗口中的图像。 – Hectooorr
我为你准备了一把小提琴。查看更新后的答案。 – ilter
仍然'fancybox-button'添加'fancy-box'不会打开与'custom-thumbnail'内部链接相同属性的图库。 – Hectooorr