2013-03-01 39 views
1

我有一個導航欄,它被編程爲在on.click上滾動到屏幕上,然後再次回滾on.click。響應式網格已打破我的js元素

它工作的很好,但現在它根本不工作。我沒有將佈局轉換爲12 col網格以實現流體響應設計,但即使現在我將其設置回另一路,它仍然無法工作。

任何幫助總是讚賞。

這裏的網站:http://ericbrockmanwebsites.com/dev4/

和標記起來:

<div class="row-fluid"> 
    <div class="span12"> 
     <div id="dashboard"> 
      <nav id="access"> 
       <div class="open">Here's the Nav Bar 
      </nav> 
     </div> <!-- dashboard --> 
    </div> <!-- span12 --> 
</div> <!-- row-fluid --> 

和腳本:

$('.open').bind('click',function() { 
    $('#dashboard').stop().animate({ 
     right: $(this).hasClass('close') ? '-659px' : '0' 
    }); 
    $(this).toggleClass('close'); 
}); 

現在,我想這是這是造成麻煩的CSS,但我我不知道在哪裏看,只是學習響應式設計,我認爲它不會幫我傾倒整個樣式表,但我會嘗試挑出相關位:

html { 
    min-height: 100%; 
    background-size: cover; 
    background-image: url(images/bg.jpg); 
    background-repeat: no-repeat; 
    background-position: right bottom; 
} 

body{ 
    min-height:100%; 
    overflow-x:hidden; 
} 

.row-fluid .span12 { 
    width: 100%; 
    *width: 99.94680851063829%; 
} 

#access { 
    display: block; 
    float: right; 
    margin: 10px auto 0; 
    width: 730px; 
} 

#dashboard { 
    font-size: 30px; 
    float: left; 
    position: absolute; 
    right: -659px; 
    z-index: 100; 
} 

.open { 
    background: #cabd32 url(images/open.png) top left no-repeat; 
    background-position: center; 
    float: left; 
    padding: 32px 35px 33px; 
} 

.close { 
    background: #cabd32 url(images/close.png) top left no-repeat; 
    background-position: center; 
    float: left; 
    padding: 32px 35px 33px; 
} 

一直在它採摘了幾個小時,無濟於事,愛一些幫助。 歡呼聲,

+2

如果開放的開發工具和檢查控制檯,您會看到你的主題的CSS沒有加載,它給出了404,加上你有一個其他與'jquery.easing'有關的錯誤 – elclanrs 2013-03-01 05:01:32

+0

感謝@elclanrs這些都是無關的,所以我不認爲它們會有什麼影響,但是把頭部的這些腳本調用去修復它。必須開始使用我的控制檯! – 2013-03-01 05:11:54

回答

0

試試這個:

SCRIPT

$('.open').bind('click',function(){ 
    $('#dashboard').stop().animate(
    { 
     right: $(this).hasClass('close') ? '-790px' : '0' 
    }); 
    $(this).toggleClass('close'); 
}); 

,並更改dashboardCSS

#dashboard { 
    font-size:30px; 
    float:left; 
    position: absolute; 
    right: -790px; 
    z-index: 100; 
} 
+0

嗨@Rohan,問題似乎通過刪除頭部分中的無關腳本來解決。我沒有看到你的建議和現在有什麼不同。我錯過了什麼嗎? – 2013-03-01 16:35:21