Add this (highlighted) to your script as shown:
Code:
<script>
// Load the classic theme
Galleria.loadTheme('galleria.twelve.min.js');
// Initialize Galleria
$('#galleria').galleria({
// Toggles the fullscreen button
_showFullscreen: true,
// Toggles the lightbox button
_showPopout: false,
// Toggles the progress bar when playing a slideshow
_showProgress: true,
// Toggles tooltip
_showTooltip: true,
// Localized strings, modify these if you want tooltips in your language
_locale: {
show_thumbnails: "Show Thumbnails",
hide_thumbnails: "Hide Thumbnails",
play: "Play",
pause: "Pause",
enter_fullscreen: "Enter Fullscreen",
exit_fullscreen: "ExitFullscreen",
popout_image: "Popout image",
showing_image: "Image %s sur %s"
}
});
if(window.location.href !== top.location.href){
(function(){
var topdoc = top.window.document, topiframe = topdoc.getElementsByName('iframe1')[0].style;
$('body').on('click', '.galleria-fullscreen', function(){
if($(this).parents('.galleria-container').eq(0).hasClass('fullscreen')){
topdoc.documentElement.style.overflow = 'hidden';
topiframe.height = '100%';
topiframe.width = '100%';
topiframe.position = 'fixed';
topiframe.top = 0;
topiframe.left = 0;
} else {
top.location.href = widow.location.href;
topdoc.documentElement.style.overflow = '';
topiframe.height = '';
topiframe.width = '';
topiframe.position = '';
topiframe.top = '';
topiframe.left = '';
}
});
})();
}
</script>
I tested this as much as I could using the console, but if there are any problems or questions, just let me know.
The browser cache may have to be cleared and/or the page(s) (probably both of them, top and in the iframe one) refreshed to see changes.
Note: don't copy code from email notifications it could be corrupted.
Bookmarks