Created
May 16, 2012 03:10
-
-
Save plavet/2707013 to your computer and use it in GitHub Desktop.
Jquery - Open in new window using rel
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
//Open link in new tab | |
$("a[rel^='external']").click(function(){ | |
this.target = "_blank"; | |
}); | |
// Usage: | |
// <a href="#" rel="external">#</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment