Created
August 9, 2011 20:59
-
-
Save kevinthompson/1135177 to your computer and use it in GitHub Desktop.
Open External Links in New Tabs
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
// Open All External Links in a New Tab | |
$('a').not('[href^="/"],[href*="' + window.location.host + '"]').attr('target','_blank'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment