108

I'm not understanding how Twitter Bootstrap does active links for the navigation. If I have a regular navigation like this (with ruby on rails linking):

<ul class="nav">
  <li class="active"> <a href="/link">Link</a> </li>
  <li class=""> <a href="/link">Link</a> </li>
  <li class=""> <a href="/link">Link</a> </li>        
</ul>

How do I keep it active based on the link clicked?

LearningRoR
  • 26,582
  • 22
  • 85
  • 150
  • 1
    FYI: I use the active_link_to gem and specify {:wrap_class => :li}. This will create:
  • ...
  • when the REQUEST_URI matches the HREF value... – Justin E Oct 07 '15 at 12:06