On one of my pages, I'm trying to use two different FancyBox styles for different elements. To accomplish this, I have included the tpl
option and made adjustments to the stylesheet. Here is what I currently have:
$(document).ready(function() {
$(".login").fancybox({
closeClick : false,
closeBtn : true,
tpl: {
wrap : '<div class="fancybox-wrap1" tabIndex="-1"><div class="fancybox-skin1"><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>',
closeBtn : '<a title="Close" class="fancybox-item fancybox-close" href="javascript:;"></a>'
}
});
});
In my CSS file, I have added new styles for .fancybox-wrap1 and .fancybox-skin1. The styles are working well, but I encountered an issue where the "close" button completely disappears on the FancyBox with the modified template. I have tried both including and omitting the closeBtn
from the tpl
, but it doesn't seem to change anything.
You can view a demo here. In the future, I will need different background images for the FancyBox, not just background-color, which is why I am making these modifications.
I would greatly appreciate any assistance in figuring out what I might be doing incorrectly. Thank you!