Skip to content

Instantly share code, notes, and snippets.

@rfunduk
Created August 16, 2011 16:28
Show Gist options
  • Save rfunduk/1149479 to your computer and use it in GitHub Desktop.
Save rfunduk/1149479 to your computer and use it in GitHub Desktop.
<a href="somewhere.com" rel="external" title="somewhere.com">
somewhere.com
</a>
$('a[rel=external]').each(
function() {
$(this).attr( 'target', '_blank' );
}
);
<a href="somewhere.com" rel="external" target="_blank" title="somewhere.com">
somewhere.com
</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment