Created
April 20, 2022 16:58
-
-
Save wiliscavalcante/f59a02f7faf58fbf4bf26acddf3cbe6d to your computer and use it in GitHub Desktop.
Abrindo um link externo em uma nova aba no Ghost
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
<script type="text/javascript"> | |
$(document).ready(function() { | |
$("a").each(function(){ | |
if(this.href.indexOf(window.location.host) == -1) { | |
$(this).attr("target", "_blank"); | |
} | |
}) | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment