Created
November 21, 2013 16:05
-
-
Save iros/7584424 to your computer and use it in GitHub Desktop.
Full screening
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
if (document.body.requestFullscreen || | |
document.body.mozRequestFullScreen || | |
document.body.webkitRequestFullscreen | |
) { | |
$("<button>View this chart in Full Screen</button>") | |
.on('click', function (e) { | |
var root = $interactive.get(0); | |
if (root.requestFullscreen) { root.requestFullscreen(); } | |
else if (root.mozRequestFullScreen) { root.mozRequestFullScreen(); } | |
else if (root.webkitRequestFullscreen) { root.webkitRequestFullscreen(); } | |
e.preventDefault(); | |
}) | |
.appendTo($interactive); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment