From: Leif Hanson Date: Mon, 9 Sep 2013 15:49:49 +0000 (+0000) Subject: Switch to a local external.js file. X-Git-Tag: v1.0~45 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=ef086b888b675c6d363768b8dc88699102e2f362;p=web%2FMichiganTrailMaps.git Switch to a local external.js file. --- diff --git a/libjs/external.js b/libjs/external.js index 8ad9e21..08ddf63 100755 --- a/libjs/external.js +++ b/libjs/external.js @@ -7,7 +7,7 @@ $('a').each(function() { var urlPattern = new RegExp('/' + window.location.host + '/'); console.log(window.location.host); - console.log($(this).attr('href')); + console.log(this.href); console.log(window.location.host.indexOf($(this).attr('href')) + "\n\n"); if( !urlPattern.test(this.href) && !$(this).hasClass('thickbox') @@ -18,7 +18,7 @@ $('a').each(function() { && ($(this).attr('href') != "#") && ($(this).attr('href') != "") && ($(this).attr('href') != null) - && ($(this).attr('href').indexOf(window.location.host) >= 0) + && (this.href.indexOf(window.location.host) >= 0) ) { $(this).click(function(event) { event.preventDefault();