Skip to content

Instantly share code, notes, and snippets.

@ss81
Created October 18, 2012 10:20
Show Gist options
  • Save ss81/3910883 to your computer and use it in GitHub Desktop.
Save ss81/3910883 to your computer and use it in GitHub Desktop.
Open new popup window and maximize it.
var w = window.open(jQuery(this).attr('href'), 'real-size-photo', 'width=500,height=500');
w.moveTo(0, 0);
if (document.all) {
w.resizeTo(screen.availWidth, screen.availHeight);
}
else {
if (document.layers || document.getElementById) {
if (w.outerHeight < screen.availHeight || w.outerWidth < screen.availWidth) {
w.outerHeight = top.screen.availHeight;
w.outerWidth = top.screen.availWidth;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment