无法在wordpress上单击超链接



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

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();

它似乎删除了与它重叠的样式,这导致它的页面有点断裂:(

我是不是偶然错过了一些简单的东西?

您的链接在我端工作。如果您的链接仍然有问题,请使用CSS proerty。

Z-index:999;

相关内容

  • 没有找到相关文章

最新更新