I would like to use html instead of an image for the fancybox close button.
Here’s what I think should work:
$('.fancybox-media').fancybox({
afterLoad : function() {
$('div.fancybox-close').html('X');
}
});
Just focusing on the close button here. Any ideas why this isn’t working?
For fancybox v2.x you can use the option
tplto set whatever html you want likeNotice that in this example I set my own selector
id="myCloseID "to theclosecontainer (closeBtn) so I can add my own css style to the new html like :Eventually, you may prefer to use the default
tplfor thecloseBtnwith your own html…and just remove the background image through css like