2012-09-03 4 views
0

나는 워드 프레스를 KIN 테마로 사용하는 친구를 위해 사이트를 만들었습니다. 이 사이트는 Wordpress를 기반으로하며 AJAX를 사용하여 모든 페이지를로드하지만 링크는 클릭 할 수 없지만! 나는 왜 그런지 전혀 모른다. 다음은 터치 페이지의 KEEP로 이동하는 경우, 당신이 페이지에 대한 링크가 알 수하이퍼 링크는 워드 프레스에서 클릭 할 수 없습니다.

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

}); 

누구?

나는 스타일이 조금 :(

내가 혹시 뭔가를 간단 말이냐을 깨는 페이지를 어떤 결과를 중복 제거하는 것

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

(라인 297에서) 주석 때 그런 다음 CSS의 proerty를 사용하여 링크와 함께 문제가 여전히 있다면?

+0

전용 "접촉 유지"섹션의 링크가 작동하지 않습니다. 맞습니까? 다른 모든 사람들은 내 끝에서 잘 작동합니다. – Libin

+0

모든 페이지 내용 하이퍼 링크가 작동하지 않습니다. 다른 모든 페이지에는 다른 페이지에 대한 링크가 없으므로 정상적으로 작동합니다. 그래서 네, 그냥 터치 섹션에서 나는 실제로 클릭하는 링크를 얻을 수 없습니다. 아마도 AJAX와 JS는 하이퍼 링크를 멈추게 할 것입니다. 아마도 다른 페이지에서 그렇게 할 것이기 때문입니다. –

+0

예. 그 아약스는 하이퍼 링크의 기능을 멈추게합니다. 모든 js를 사용하지 못하게하고 링크가 새 탭에서 열리는 것을 발견했습니다. – Libin

답변

0

귀하의 링크는 내 말에 노력하고 있습니다.

Z-index:999; 
+0

새 창에서 열리지 않습니까? Chrome에서 열어 보자. ( –

+0

z-index가 200에서 999로 변경되었지만 여전히 운이 없다. 크롬, 사파리 및 파이어 폭스를 사용하는 Mac에서 im ... –

+0

안녕하세요, 어딘가에 위치를 사용합니다. FIREBUG 또는 Mac에서 사용 된 것을 통해 확인하고 소비 된 공간을 확인하십시오. – Shobhit

관련 문제