* Return false if fullscreen is not supported.
*/
setupFullscreen = function () {
- if ( document.fullscreenEnabled ||
- document.mozFullScreenEnabled ||
- document.webkitFullscreenEnabled ||
- document.msFullscreenEnabled
- ) {
+ if ( $.support.fullscreen ) {
// When the fullscreen mode is changed, trigger the
// fullscreen events (and when exiting,
// also remove the fullscreen class)
return this;
}
};
+
+ $.support.fullscreen = document.fullscreenEnabled ||
+ document.webkitFullscreenEnabled ||
+ document.mozFullScreenEnabled ||
+ document.msFullscreenEnabled;
}( jQuery ) );