-
-
Save Victa/2802845 to your computer and use it in GitHub Desktop.
Do your clients have the incurable target=_blank disease for external links? Add this jQuery snippet to your js code to add targets to all external links.
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
$(function() { | |
$('a').not('[href*=clientdomain\\.com]').attr('target', '_blank'); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment