Simplified JS http/https external link code.

This commit is contained in:
MickeyKay
2014-03-31 14:42:28 -07:00
parent 5b405e3a7f
commit 6aa7c90273
+1 -1
View File
@@ -18,7 +18,7 @@ jQuery(document).ready(function() {
// External Links
var h = window.location.host.toLowerCase();
jQuery('[href^="http://"],[href^="https://"]').not('[href*="' + h + '"]').addClass('external-link').attr("target", "_blank");
jQuery('[href^="http"]').not('[href*="' + h + '"]').addClass('external-link').attr("target", "_blank");
// Add classes to different types of links
jQuery('a[href^="mailto:"]').addClass('email-link');