Как открыть ту же галерею, что «.fancybox» открывается, когда я нажимаю кнопку «.fancybox-button», сохраняя при этом одинаковые настройки причудливого окна?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