이미지의 title
또는 'alt'속성을 사용하여 FancyBox로 제목을 표시하려고합니다. 관련 코드는 다음과 같습니다.Fancybox 캡션에 이미지 alt 사용
$("a[rel=fancybox]").fancybox({
'transitionIn' : 'fade',
'transitionOut' : 'elastic',
'titlePosition' : 'inside',
'titleFormat' : function(title, currentArray, currentIndex, currentOpts) {
return '<span id="fancybox-title-over">Look ' +
(currentIndex + 1) + '/' + currentArray.length +
(title.length ? ' ' + title : '') + '</span>';
},
'autoScale':false,
'mouseWheelNavigation': false,
'onComplete' : function() {$("#fancybox-wrap").unbind('mousewheel.fb');} ,
});
});
대단히 고마워요. 두 번째 링크 지침은 매력처럼 작동합니다. – user1269725
이 답을 잊지 마시기 바랍니다. 감사 – JFK