Last active
August 29, 2015 14:18
-
-
Save nucreativa/0f2b3c044d1580aa8a61 to your computer and use it in GitHub Desktop.
How to open page in new window
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
// You only need to add class "open-new-window" on link that you want to open in new window | |
// Function for open link in new browser window | |
$("a.open-new-window") | |
.on('click', function () { | |
var url = $(this).attr('href'), | |
conf = "height=" + (window.screen.height * 0.9) + ",width=" + (window.screen.width * 0.9); | |
window.open(url, 'New Window', conf); | |
return false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment