2012-09-20 129 views
0

點擊圖片右側的白色塊應滑動到奇蹟餐廳頁面,但它似乎沒有做任何事情。點擊滾動時jQuery不起作用

http://www.wondercafe.co.uk/test/

我得到的元素檢查以下錯誤信息:

無法加載資源:服務器與404(未找到)狀態

<script type="text/javascript"> 
$.getDocHeight = function(){ 
    return Math.max(
     $(document).height(), 
     $(window).height(), 
     /* For opera: */ 
     document.documentElement.clientHeight 
    ); 
    }; 
    $(document).ready(function() { 
     $('#wonder-diner #ajax-wrapper').load('/node/10 #wonder-diner', function() { 
      $('#wonder-diner #wonder-diner #clicker').remove(); 
      $('#wonder-diner #ajax-wrapper #scroll').jScrollPane(); 
      var centerwidth = $(window).width() - $('#sidebar-left').width() - $('#clicker').width() - $('#center').width() - 15; 
     $('#wonder-diner #center').css({ 'left' : centerwidth/2 + $('#clicker').width() + 2.5, 'margin' : '0', 'position' : 'absolute' }); 
     if ($(window).width() < 937) { 
      $('#wonder-diner #center').css({ 'right' : '230px' }); 
     } 

      var contentHeight = $.getDocHeight() - ($('#footer').height() + 15) - (26 + 15) - 80; // Height of window - (footer height + padding bottom) - (margin top of #aqueeze + padding top) - padding on .inside 
     $('#wonder-diner #wrapper #container #center .inside').css({'height' : contentHeight}); 
     $('#wonder-diner #scroll').css({'height' : contentHeight}); 
     $('#wonder-diner #scroll').not($('.page-food-drink #scroll, .page-roastery-coffees #scroll')).jScrollPane({ verticalDragMaxHeight: 100 }); 

     $(window).bind('resize', function() { 

    var contentHeight = $.getDocHeight() - ($('#footer').height() + 15) - (26 + 15) - 80; // Height of window - (footer height + padding bottom) - (margin top of #aqueeze + padding top) - padding on .inside 
    $('#wonder-diner #wrapper #container #center .inside').css({'height' : contentHeight}); 
    var centerwidth = $(window).width() - $('#sidebar-left').width() - $('#clicker').width() - $('#center').width() - 15; 
    $('#wonder-diner #center').css({ 'left' : centerwidth/2 + $('#clicker').width() + 2.5, 'margin' : '0', 'position' : 'absolute' }); 
    $('#wonder-diner #scroll').css({'height' : contentHeight}); 
    $('#wonder-diner #scroll').not($('.page-food-drink #scroll, .page-roastery-coffees #scroll')).jScrollPane({ verticalDragMaxHeight: 100 }); 

    if ($(window).width() < 937) { 
     $('#wonder-diner #center').css({ 'right' : '230px' }); 
    } 

}); 
     }); 
     $('.scrollPage').click(function() { 
      var elementClicked = $(this).attr("href"); 
      var destination = $(elementClicked).offset().left; 
      $("html:not(:animated),body:not(:animated)").animate({ scrollLeft: destination}, 500, 'linear'); 
     return false; 
     }); 

     $('li.menu-2409 a').click(function() { 
      var elementClicked = $(this).attr("href"); 
      var destination = $(elementClicked).offset().left; 
      $("#holder").animate({ 
        left: '-100%' 
       }, 500, 'linear'); 
      return false; 
     }); 
     $('li.menu-2456 a').live('click', function() { 
      //var elementClicked = $(this).attr("href"); 
      var destination = $('#restaurant').offset().left; 
      $("#holder").animate({ 
        left: '0' 
       }, 500, 'linear'); 
      return false; 
     }); 
    }); 
    </script> 
+1

我記下它是否會解決任何問題,但404錯誤是因爲http://www.wondercafe.co.uk/node/10在運行.load函數時未找到 –

回答

0

.load('/node/10 #wonder-diner'迴應不是正確的網址。