Last active
February 16, 2019 09:06
-
-
Save vosaul/b59dd32eb222cec7a979fa3e211790f7 to your computer and use it in GitHub Desktop.
fullscreen
This file contains 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
$(document).ready(function(){ | |
$('.mySlides').click(function() { | |
console.log('!!!'); | |
var elements = document.getElementsByClassName("visible"); | |
var elem = elements[0]; | |
if (elem.requestFullscreen) { | |
console.log('1'); | |
elem.requestFullscreen(); | |
} else if (elem.mozRequestFullScreen) { | |
console.log('2'); | |
elem.mozRequestFullScreen(); | |
} else if (elem.webkitRequestFullscreen) { | |
console.log('3'); | |
elem.webkitRequestFullscreen(); | |
} | |
else {console.log('WTF');} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment