2012-09-03 143 views
0

我有一个网站,我为一个朋友使用wordpress主题KIN作为基地。该网站建立在Wordpress上,它使用AJAX加载所有页面,但链接虽然可见,但无法点击!我根本不知道为什么。下面是该网站...超链接无法点击wordpress

http://www.baudesigncreative.com

如果你导航到该保持联系页面,你会发现有链接的网页。奇怪的事情,因为我可以看到状态栏上的链接,但没有任何反应,当我点击。林不知道在哪里寻找解决这个问题,任何人都可以提供任何帮助?

非常感谢!


我发现链路中断是由于来自于bau.js从下面帮助,

$(document).ready(function() { 

    var url = ''; 
    var currentOpen = ''; 

    var mousedown = false; 
    var galleryMousedown = false; 
    var mouseX = 0; 
    var xdiff = 0; 

    var movePercentage = 0; 
    var toMove = 0; 

    function randomQuotes() { 
    $('body').append('<div id="bau-quotes-holder"></div>'); 
    $('#bau-quotes-holder').hide(); 

    var quotesUrl = 'http://baudesigncreative.com/quotes/'; 
    var quotesLength = 0; 

    $('#bau-description').html('').hide(); 
    $('#bau-quotes-holder').load(quotesUrl + ' #page_content_wrapper', function() { 
     $('#bau-quotes-holder').find('dt').each(function() { 
     $('#bau-description').append('<img src="' + $('a', this).attr('href') + '" />'); 
     quotesLength++; 
     }); 
     $('#bau-description img').hide(); 

     var randomized = Math.floor((Math.random() * quotesLength) + 1); 

     $('#bau-description').show(); 
     $('#bau-description img:nth-child(' + randomized + ')').fadeIn(500, function() { 
     $('#bau-quotes-holder').remove(); 
     }); 
    }); 
    } 

    randomQuotes(); 

    function scrollers() { 
    $('#bau-gallery').hover(function() { 
     $('#bau-gallery-left').fadeIn(200); 
     $('#bau-gallery-right').css('marginLeft', $('#galleryScrollbar').width() - '29').fadeIn(200); 
    }, function() { 
     $('#bau-gallery-left').fadeOut(200); 
     $('#bau-gallery-right').fadeOut(200); 
    }); 

    var galleryLength = 0;  
    $('#bau-gallery-list').find('img').each(function() { 
     galleryLength++; 
    }); 

    var scrollbarWidth = parseFloat($('#galleryScrollbar').width()) - 20; 
    var scrollbarToMove = 0; 

    var isDown = false; 
    var galleryLeft = parseFloat($('#bau-gallery-list').css('left')); 
    var galleryWidth = parseFloat($('#bau-gallery-list').width()); 
    var lastImgWidth = parseFloat($('#bau-gallery-list img:last-child').width()) + 2; 

    toMove = Math.abs($('hr').width() - $('#bau-gallery-list img:last-child').width()); 
    // var jumpWidth = ((galleryWidth - lastImgWidth - toMove)/(galleryLength - 1))/20; 
    var jumpWidth = ((galleryWidth - lastImgWidth - toMove)/(galleryLength - 1))/2; 

    // scrollbarToMove = (scrollbarWidth/(galleryLength - 1))/20; 
    scrollbarToMove = (scrollbarWidth/(galleryLength - 1))/2; 

    var timeoutLeft; 
    var timeoutRight; 

    $('#bau-gallery-left').dblclick(function(e) { 
     return false; 
    }); 

    $('#bau-gallery-right').dblclick(function(e) { 
     return false; 
    }); 

    $('#bau-gallery-left').click(function(e) { 
     galleryWidth = parseFloat($('#bau-gallery-list').width()); 
     lastImgWidth = parseFloat($('#bau-gallery-list img:last-child').width()) + 2; 
     toMove = Math.abs($('hr').width() - $('#bau-gallery-list img:last-child').width()); 
     jumpWidth = ((galleryWidth - lastImgWidth - toMove)/(galleryLength - 1))/2; 

     if ((galleryWidth - Math.abs(parseFloat($('#bau-gallery-list').css('left')))) > galleryWidth - jumpWidth) { 
     $('#galleryScrollbarThumb').css('left', 0); 
     $('#bau-gallery-list').css('left', 0); 
     } 
     else { 
     $('#bau-gallery-list').animate({'left': '+=' + jumpWidth + 'px'}, 100); 
     $('#galleryScrollbarThumb').animate({'left': '-=' + scrollbarToMove + 'px'}, 100); 
     } 

     return false; 
    }); 

    $('#bau-gallery-right').click(function(e) { 
     galleryWidth = parseFloat($('#bau-gallery-list').width()); 
     lastImgWidth = parseFloat($('#bau-gallery-list img:last-child').width()) + 2; 
     toMove = Math.abs($('hr').width() - $('#bau-gallery-list img:last-child').width()); 
     jumpWidth = ((galleryWidth - lastImgWidth - toMove)/(galleryLength - 1))/2; 

     if ((scrollbarWidth - Math.abs(parseFloat($('#galleryScrollbarThumb').css('left')))) < scrollbarToMove) { 
     $('#galleryScrollbarThumb').css('left', scrollbarWidth); 
     $('#bau-gallery-list').css('left', -(galleryWidth - lastImgWidth - toMove)); 
     } 
     else { 
     $('#bau-gallery-list').animate({'left': '-=' + jumpWidth + 'px'}, 100); 
     $('#galleryScrollbarThumb').animate({'left': '+=' + scrollbarToMove + 'px'}, 100); 
     } 

     return false; 
    }); 

    //onhold 
    // $('#bau-gallery-left').mousedown(function(e) { 
     // if (!galleryMousedown) { 
     // galleryMousedown = true; 
     // timeoutLeft = setInterval(function() { 
      // if ((scrollbarWidth - Math.abs(parseFloat($('#galleryScrollbarThumb').css('left')))) > scrollbarWidth - scrollbarToMove) { 
      // $('#galleryScrollbarThumb').css('left', 0); 
      // $('#bau-gallery-list').css('left', 0); 
      // } 
      // else { 
      // $('#bau-gallery-list').animate({'left': '+=' + jumpWidth + 'px'}, 50); 
      // $('#galleryScrollbarThumb').animate({'left': '-=' + scrollbarToMove + 'px'}, 50); 
      // } 
     // }, 50); 
     // } 

     // return false; 
    // }); 

    // $('#bau-gallery-right').mousedown(function(e) { 
     // if (!galleryMousedown) { 
     // galleryMousedown = true; 

     // timeoutRight = setInterval(function() { 
      // if ((scrollbarWidth - Math.abs(parseFloat($('#galleryScrollbarThumb').css('left')))) < scrollbarToMove) { 
      // $('#galleryScrollbarThumb').css('left', scrollbarWidth); 
      // $('#bau-gallery-list').css('left', -(galleryWidth - lastImgWidth - toMove)); 
      // } 
      // else { 
      // $('#bau-gallery-list').animate({'left': '-=' + jumpWidth + 'px'}, 50); 
      // $('#galleryScrollbarThumb').animate({'left': '+=' + scrollbarToMove + 'px'}, 50); 
      // } 
     // }, 50); 
     // }   
     // return false; 
    // }); 

    // $(window).mouseup(function(e) { 
     // galleryMousedown = false; 
     // clearInterval(timeoutLeft); 
     // clearInterval(timeoutRight); 

     // return false; 
    // }); 
    } 

    function backLoop() { 
    $('#bau-gallery-back a').dblclick(function(e) { 
     return false; 
    }); 

    $('#bau-gallery-back a').click(function(e) { 
     randomQuotes(); 
     var backShowcaseUrl = $(this).attr('href'); 
     $('#bau-content').fadeOut(1000, function() { 
     $('#bau-gallery').remove(); 
     $('#bau-content').hide(); 
     $('#bau-content').append('<div id="page_content_wrapper"><div class="inner"><div id="bau-showcase"></div></div></div>') 
     $('#bau-showcase').append($('#bau-showcase-holder').html()); 
     $('#bau-content').height('') 
      .css('marginBottom', '') 
      .width('') 
      .css('overflow', ''); 
     $('#bau-content').fadeIn(500, function() { 
      $('#bau-showcase-holder').remove(); 
      showcaseEvents(); 
     }); 
     $('#bau-content').height($('.inner').height()); 
     }); 

     return false; 
    }); 
    } 

    function showcaseEvents() { 
    $('#bau-showcase li').dblclick(function(e) { 
     return false; 
    }); 

    $('#bau-showcase li').click(function(e) { 
     randomQuotes(); 
     var showcaseUrl = $('a', this).attr('href'); 
     var tempWidth = 0; 

     $('#bau-content').fadeOut(1000, function() { 
     $('#bau-showcase-holder').remove(); 
     $('body').append('<div id="bau-showcase-holder">' + $('#bau-showcase').html() + '</div>'); 
     $('#bau-showcase-holder').hide(); 

     $('#page_content_wrapper').remove(); 
     $('#bau-content').append('<div id="bau-gallery"></div>'); 

     $('#bau-gallery-holder').load(showcaseUrl + ' #page_content_wrapper', function() { 
      $('#bau-gallery').append('<div id="bau-gallery-title">' + $('#bau-gallery-holder h2').text() + '</div><div id="bau-gallery-list"></div><div id="bau-gallery-left" class="scroller scroll-left"></div><div id="bau-gallery-right" class="scroller scroll-right"></div>') 

      $('#bau-gallery-holder').find('dt').each(function() { 
      var _thisImgUrl = $('a', this).attr('href'); 

      $('#bau-gallery-list').append('<img src="' + _thisImgUrl + '"/>'); 
      }); 

      $('#bau-gallery').append('<div class="clear"></div><div id="galleryScrollbar"><div id="galleryScrollbarThumb"><img src="http://baudesigncreative.com/wp-content/uploads/2011/09/scrollbar_thumb.png" alt=""></div></div>') 
      .append('<div id="bau-gallery-back"><a href="' + $('#main_menu li:nth-child(2) a').attr('href') + '"><img src="http://baudesigncreative.com/wp-content/uploads/2011/09/back-to-showcase.png" />Back to Showcase</a></div>'); 

      $('#bau-content').fadeIn(1000, function() { 
      tempWidth = $('#bau-gallery').width(); 
      // $('#bau-gallery').width($('hr').width()); 
      $('#bau-content').width($('hr').width()); 
      // $('#bau-gallery-list').width($('#bau-gallery').width()); 
      // $('#bau-gallery-list').width($('hr').width()); 

      $('#galleryScrollbarThumb').mousedown(function(event) { 
       if (!mousedown) { 
       mousedown = true; 
       } 

       return false; 
      }); 

      var scrollerOffset = $('hr').offset(); 
      var scrollerOffsetLeft = scrollerOffset.left; 
      var realEvent = 0; 

      $(window).mousemove(function(event) { 
       if (mousedown) { 
       realEvent = event.pageX - (scrollerOffsetLeft + 10); 

       if (realEvent < 0) { 
        realEvent = 0; 
       } 
       else if (realEvent > ($('hr').width() - 20)) { 
        realEvent = $('hr').width() - 20; 
       } 

       $('#galleryScrollbarThumb').css('left', realEvent); 
       movePercentage = (realEvent)/($('hr').width() - 20); 
       toMove = Math.abs($('hr').width() - $('#bau-gallery-list img:last-child').width()); 
       $('#bau-gallery-list').css('left', -(movePercentage * ($('#bau-gallery-list').width() - $('#bau-gallery-list img:last-child').width() - 2 - toMove))); 
       } 

       return false; 
      }); 

      $(window).mouseup(function(event) { 
       mousedown = false; 

       if (parseFloat($('#galleryScrollbarThumb').css('left')) <= 0) { 
       $('#galleryScrollbarThumb').css('left', 0); 
       $('#bau-gallery-list').css('left', 0); 
       } 
       else if (parseFloat($('#galleryScrollbarThumb').css('left')) >= $('hr').width() - 20) { 
       $('#galleryScrollbarThumb').css('left', $('hr').width() - 20); 
       toMove = Math.abs($('hr').width() - $('#bau-gallery-list img:last-child').width()); 
       $('#bau-gallery-list').css('left', -($('#bau-gallery-list').width() - $('#bau-gallery-list img:last-child').width() - 2 - toMove)); 
       } 

       return false; 
      }); 

      scrollers(); 

      backLoop(); 
      }); 

      $('#bau-content').height($('#bau-gallery').height()) 
      .css('marginBottom', $('#bau-gallery').css('marginBottom')) 
      .width('100%') 
      .css('overflow', 'hidden'); 

      $('#bau-gallery-back').width($('hr').width()); 
      $('#galleryScrollbar').width($('hr').width()); 

      $('#bau-gallery-holder').remove(); 
      $('body').prepend('<div id="bau-gallery-holder"></div>'); 
     }); 
     }); 

     return false; 
    }); 
    } 

    $('#page_content_wrapper').remove(); 
    $('#main_menu li:first').append('<div id="bau-ajax"><div id="bau-content"></div><div class="clear"></div></div>'); 
    $('#bau-ajax').hide(); 

    $('body').prepend('<div id="bau-gallery-holder"></div>'); 
    $('#bau-gallery-holder').hide(); 

    $('#main_menu > li').dblclick(function(e) { 
    return false; 
    }); 

    $('#main_menu > li').click(function(e) { 
    randomQuotes(); 
    $('#bau-showcase-holder').remove(); 
    var _this = $(this); 
    var _thisA = $('a', this); 

    $('#main_menu li a').css('color', '#000'); 
    $('#bau-content').slideUp(500, function() { 
     if (_this.attr('id') != currentOpen) { 
     $('#bau-ajax').remove(); 
     _this.append('<div id="bau-ajax"><hr><div id="bau-content"></div><div class="clear"></div><hr></div>'); 
     url = _thisA.attr('href'); 

     $('#bau-ajax').show(); 
     $('#bau-content').hide(); 
     _thisA.css('color', '#909295'); 

     $('#bau-content').load(url + ' #page_content_wrapper', function() { 
      $('#bau-content h1').remove(); 
      $('#bau-content br').remove(); 

      $('#bau-content').fadeIn(500, function() { 
      $('#bau-content').click(function(e) { 
       return false; 
      }); 

      showcaseEvents(); 
      }); 

      $('#bau-content').height($('.inner').height()); 
      currentOpen = _this.attr('id'); 
     }); 
     } 
     else { 
     $('#bau-ajax').remove(); 
     _this.append('<div id="bau-ajax"><div id="bau-content"></div><div class="clear"></div></div>'); 
     url = _thisA.attr('href'); 
     currentOpen = ''; 
     } 
    }); 

    return false; 
    }); 

    //styleSheets 
    $('#menu_wrapper').css('width', '100%'); 
    $('#page_content_wrapper').css('width', '1000px'); 

}); 

任何人以任何机会点什么,可能是它?

当我注释掉(从线297)

$('#page_content_wrapper').remove(); 

似乎除去造型将其覆盖,导致它打破了一下:(

am我任何机会失去了一些东西简单的页面?

+0

只有“保持联系”部分的链接不起作用,对吧?所有其他人对我的工作很好。 – Libin

+0

所有的页面内容超链接不起作用,所有其他页面没有链接到另一个页面,所以它工作正常。所以,只是保持联系部分,我不能让链接实际点击。我觉得它的AJAX和JS阻止超链接,因为它可以在不同的页面上做到这一点? –

+0

是的。它是停止超链接功能的ajax。我试图禁用所有的js,发现链接在一个新标签中打开。 – Libin

回答

0

你的链接是在我结束工作,如果你仍然有联系,然后使用CSS proerty问题。

Z-index:999; 
+0

它打开一个新窗口就好了吗?我似乎无法让他们打开铬::( –

+0

只需将z-index从200更改为999,但仍然没有运气,即时消息在使用Chrome浏览器,safari和firefox的Mac上都不起作用... –

+0

嗨,某处使用位置:相对标记消耗请通过FIREBUG或Mac中使用的东西进行检查,并找出所消耗的空间... – Shobhit