Note that there are some explanatory texts on larger screens.

plurals
  1. POScrollspy: Can get to work in JSfiddle but not on actual page?
    primarykey
    data
    text
    <p>I am having an issue with twitter bootstraps scrollspy. I can currently get it to work (remade an example) at <a href="http://jsfiddle.net/VLBMV/2/" rel="nofollow">http://jsfiddle.net/VLBMV/2/</a> which is awesome. However, When I convert it to an actual page of any sort. It only makes the last element in the navigation active.</p> <p>** Edit here is a live example of it failing with the code below: <a href="http://reageek.ca/dev/test.html" rel="nofollow">http://reageek.ca/dev/test.html</a></p> <p>Here is my code(minus the doctype):</p> <pre><code>&lt;head&gt; &lt;link rel="stylesheet" href="test.css"&gt; &lt;/head&gt; &lt;body data-spy="scroll" data-target="#navbar"&gt; &lt;div&gt; &lt;div id="post1" class="box"&gt; &lt;h1&gt;Post 1&lt;/h1&gt; &lt;/div&gt; &lt;div id="post2" class="box"&gt; &lt;h1&gt;Post 2&lt;/h1&gt; &lt;/div&gt; &lt;div id="post3" class="box"&gt; &lt;h1&gt;Post 3&lt;/h1&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="navbar"&gt; &lt;ul class="nav"&gt; &lt;li&gt;&lt;a href="#post1"&gt;Post 1&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="#post2"&gt;Post 2&lt;/a&gt; &lt;/li&gt; &lt;li&gt;&lt;a href="#post3"&gt;Post 3&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt; &lt;/div&gt; &lt;script src="http://code.jquery.com/jquery-1.9.1.min.js"&gt;&lt;/script&gt; &lt;script src="http://twitter.github.com/bootstrap/assets/js/bootstrap-scrollspy.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function(){ $('#navbar').scrollspy(); }); &lt;/script&gt; </code></pre> <p></p> <p>Also here is the contents of my test.css nothing fancy here, just grey boxes</p> <pre><code> @import url(http://twitter.github.com/bootstrap/assets/css/bootstrap.css); .box{ margin: 20px; padding: 15px; background: #eee; height: 500px; } #navbar{ position: fixed; bottom: 0; left: 20px; width: 100%; background: #fff; } .nav li a{ float: left; width: 80px; padding: 15px 0; } .nav li a:hover{ color: #f33 !important; background: none; } .nav li.active a{ color: #f55; text-decoration: underline; } </code></pre> <p>Could anyone shed some light why this fails? Thanks in advance for your time.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload