Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save VasylKyryliuk/bc72d15caa3434e11a40c8d852f25637 to your computer and use it in GitHub Desktop.
Save VasylKyryliuk/bc72d15caa3434e11a40c8d852f25637 to your computer and use it in GitHub Desktop.
<script>
$('.fotorama')
.on('fotorama:fullscreenenter fotorama:fullscreenexit', function (e, fotorama) {
if (e.type === 'fotorama:fullscreenenter') {
// Options for the fullscreen
fotorama.setOptions({
fit: 'cover'
});
} else {
// Back to normal settings
fotorama.setOptions({
fit: 'contain'
});
}
})
.fotorama();
</script>
<div class="fotorama" data-auto="false">
<img /><img /><img />
</div>
меняет под при полном екране
The data-auto="false" attribute on fotorama block is important.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment