Skip to content

Instantly share code, notes, and snippets.

@demonixis
Last active December 12, 2015 06:29
Show Gist options
  • Select an option

  • Save demonixis/4729837 to your computer and use it in GitHub Desktop.

Select an option

Save demonixis/4729837 to your computer and use it in GitHub Desktop.
Gets fullscreen (HTML5 API) to work with an iframe with colorbox.js
// Gets the iframe created by colorbox
var iframe = $("#colorbox").find("iframe");
// Gets focus on iframe
iframe.focus();
// Allow fullscreen on iframe
iframe.attr({
webkitAllowFullScreen : true,
mozAllowfullscreen : true,
allowFullScreen : true
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment