// How to execute code when exiting fullscreen mode with escape button?
$(el).bind('webkitfullscreenchange mozfullscreenchange fullscreenchange', function(e) {
var state = document.fullScreen || document.mozFullScreen || document.webkitIsFullScreen;
var event = state ? 'FullscreenOn' : 'FullscreenOff';
// Now do something interesting
alert('Event: ' + event);
});
// http://stackoverflow.com/questions/20346855/jquery-how-to-execute-code-when-exiting-fullscreen-mode-with-escape-button
// http://davidwalsh.name/fullscreen