-1

Adding an extra overlay div to the base tpl in the "fancybox-stage" ruins the captions for some reason. Without using the base tpl, the caption is read properly from tye data('caption') attribute. Is this intended?

baseTpl:

'<div class="fancybox-container" role="dialog" tabindex="-1">' +
'<div class="fancybox-bg"></div>' +
'<div class="fancybox-inner">' +
'<div class="fancybox-infobar"><span data-fancybox-index></span>&nbsp;/&nbsp;<span data-fancybox-count></span></div>' +
'<div class="fancybox-toolbar">{{buttons}}</div>' +
'<div class="fancybox-navigation">{{arrows}}</div>' +
'<div class="fancybox-stage"><div style="position:absolute;z-index:99999;"id="overlay"></div></div>' +
'<div class="fancybox-caption"></div>' +
"</div>" +
"</div>",

Even if I try to add +caption+ to the caption div in base tpl, the console error says caption is not defined, so that's not a solution either. Won't work with +slide.opts.$orig.data('caption')+either.

Flatline
  • 83
  • 1
  • 6

1 Answers1

0

I fixed it by directly editing the base tpl within the js file of fancybox, using the base tpl change through options and javascript although having exactly the same code, breaks caption functionality, however inside the core js file, it does not.

Flatline
  • 83
  • 1
  • 6