Scrollspy flickers between 2 nav elements when their order in navbar doesn't match order on the page
Created by: mpobrien
For example, in lines 83 - 88 of less.html in the docs:
<li><a href="#builtWith">Built with Less</a></li>
<li><a href="#variables">Variables</a></li>
<li><a href="#mixins">Mixins</a></li>
<li><a href="#compiling">Compiling Bootstrap</a></li>
If we change the order of these nav elements like this, so they don't match the order of the scrollpositions of the corresponding sections on the page, the active links will "flicker":
<li><a href="#builtWith">Built with Less</a></li>
<li><a href="#compiling">Compiling Bootstrap</a></li>
<li><a href="#variables">Variables</a></li>
<li><a href="#mixins">Mixins</a></li>
I have a proposed fix: simply sort the calculated offsets when the scrollspy is first created.