2012-08-29 40 views
0

請訪問:http://morningside.cardboardmonet.com/如何解決水平導航頁面調整不正確?

請注意,該網站滾動阻力從左至右,然而,當你調整窗口的大小並不scale--頁面只是一片空白。有誰知道如何解決這一問題?

謝謝!

+0

要求我們訪問您的網站以「看看有什麼問題」被認爲是不正確的形式。如果您首先嚐試將問題的範圍縮小到網站上特定的代碼段,您將得到更好的迴應。然後發佈代碼以及關於您不明白的部分的具體問題等。 –

回答

0

chacelove,請這段代碼添加到您的JS

$(document).ready(function() { 
    initDrag(); 
}); 
// 
function resize_adjustments() { 
    $("#proof").css('width', '100%'); 
    $("#proof").css('height', '100%'); 
    $("#proof > div").each(function(i) { 
     if($(this).css('left') == "0px") { 
      current = $(this).attr('id'); 
      $(this).css('left', '0'); 
     } else { 
      $(this).css('left', $("#proof").width()+"px"); 
     } 
    }); 
} 
var resizeTimer = null; 
$(window).bind('resize', function() { 
    if (resizeTimer) clearTimeout(resizeTimer); 
    resizeTimer = setTimeout(resize_adjustments, 500); 
}); 

有用嗎?

+0

不要忘記刪除$(window).resize(function(){...,好嗎? – Pluda

+0

它不會似乎工作,也許我錯了,但它打破了拖動功能... – chacelove

+0

我的錯誤!它的工作原理,謝謝:) – chacelove