2013-04-23 3 views
0

У меня этот код, и независимо от того, что я делаю, шпиона прокрутки не сработает, может ли кто-нибудь пролить свет на него? заранее спасибо!Scrollspy не работает

<div class='corpo effect8'> 
     <div class='esquerda'> 
      <div id="como-nav" class='como-menu'> 
       <div class="como-menu-topo">menu</div> 
       <ul class="como-menu-links"> 
        <li class><a href="#intro">introdução</a></li><div class="divisor-como"></div> 
        <li class><a href="#quemsomos">quem somos</a></li><div class="divisor-como"></div> 
        <li class><a href="#queremos">o que queremos</a></li><div class="divisor-como"></div> 
        <li class><a href="#coletadedados">coleta de dados</a></li><div class="divisor-como"></div> 
        <li class><a href="#ferramentas">ferramentas</a></li><div class="divisor-como"></div> 
        <li class><a href="#faq">FAQ</a></li> 
       </ul> 
      </div> 
     </div> 
     <div id="como-texto" class="comofunciona" data-spy="scroll" data-target="#como-nav" data-offset="0"> 
      <h3 id="intro">introdução</h3> 
      <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> 
      <h3 id="quemsomos">quem somos</h3> 
      <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> 
      <h3 id="queremos">o que queremos</h3> 
      <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> 
      <h3 id="coletadedados">coleta de dados</h3> 
      <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> 
      <h3 id="ferramentas">ferramentas</h3> 
      <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> 
      <h3 id="faq">faq</h3> 
      <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> 

     </div> 
+0

В основном ошибка javascript, мы не можем помочь вам, не указав нам код js – RelevantUsername

+0

У меня нет кода js, я где-то читал, что мне не нужен он, если я его назвал в html-коде ... im извините, если это звучит глупо, но это мой первый раз, когда я делаю сайт ... – diogo

ответ

0

Это будет сложно устранить, поскольку вы предоставили разметку для div. Рассмотрим ссылку на jsfiddle, чтобы мы могли получить полную картину.

Когда у меня возникли проблемы с scrollspy, это было потому, что я поставил js-код в голову, а не в нижнюю часть тела. Попробуйте разместить

<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.2/js/bootstrap.min.js"></script> 

(или любая другая версия BS, которую вы используете) перед закрытием тега.