Last active
December 15, 2015 17:19
-
-
Save hartleybrody/5295207 to your computer and use it in GitHub Desktop.
Open all links on a page in a new window, assuming jQuery is mapped to the $ sign. Useful for when I want to leave a page open (ie, GitHub dashboard) and not have to constantly be reaching for my bookmarks.
This file contains 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
$('a').each( function(index, item){ | |
item.target = '_blank'; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment