Skip to content

Instantly share code, notes, and snippets.

@hartleybrody
Last active December 15, 2015 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hartleybrody/5295207 to your computer and use it in GitHub Desktop.
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.
$('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