I'm setting up a custom zoom button and want to implement it. For some reason my defaults aren't applying to the popup.
I've tried including the out of the box structure, but to no avail.
jQuery(function($) {
$(document).ready(function() {
// Create template for zoom button
$.fancybox.defaults.tpl.zoom = '<button class="fancybox-button fancybox-zoom"><div class="zoom"><span class="zoom-inner"></span></div></button>';
// Choose what buttons to display by default
$.fancybox.defaults.buttons = [
'fullScreen',
'thumbs',
'zoom',
'close'
];
$( '.fancybox' ).fancybox({
onInit : function( instance ) {
// Make zoom icon clickable
instance.$refs.toolbar.find('.fancybox-zoom').on('click', function() {
if ( instance.isScaledDown() ) {
instance.scaleToActual();
} else {
instance.scaleToFit();
}
});
}
});
});});
Expected results is an understanding of how to implement the new zoom as well as other buttons.