Created
February 13, 2017 11:01
-
-
Save VasylKyryliuk/bc72d15caa3434e11a40c8d852f25637 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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