I'm not sure if this is a doing_it_wrong situation or a bug, but I have a global instance of fsLightbox defined as:
if (typeof fsLightbox !== "undefined") {
fsLightbox.props.exitFullscreenOnClose = true;
fsLightbox.props.disableThumbs = true;
}
This disables the default full screen behavior and removes the thumbnail button.
It works for any images that are added at load time, however, I use infinite scroll, so I added the following to refresh the lightbox as new images are added:
infScroll.on( 'append', function() {
if (typeof fsLightbox !== "undefined") {
if (window.fsLightbox) {
refreshFsLightbox();
}
}
});
Looking at the refer refreshFsLightbox source there should be a temp var that holds the value and passes it, but for the life of me I can't seem to pass the value correctly to have my settings pass to the new lightbox instance.
I'm not sure if this is a doing_it_wrong situation or a bug, but I have a global instance of
fsLightboxdefined as:This disables the default full screen behavior and removes the thumbnail button.
It works for any images that are added at load time, however, I use infinite scroll, so I added the following to refresh the lightbox as new images are added:
Looking at the refer refreshFsLightbox source there should be a temp var that holds the value and passes it, but for the life of me I can't seem to pass the value correctly to have my settings pass to the new lightbox instance.