$('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')
&& ($(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();