title: Keeping bootstrap navigation items active after reload in CakePHP
body: <p>I have bootstrap 2.3.2 navigation list in my CakePHP app and jQuery script to add active class. But then I click on link, it flashes as active for moment and retain it;s current state. I want to know If I can keep my navigation items active after reload.</p>
  
  <pre><code>&lt;ul class="nav nav-pills nav-stacked menu"&gt;                    
      &lt;li&gt;&lt;?php echo $this-&gt;Html-&gt;link(__('Reservations'), array('plugin' =&gt; false, 'controller' =&gt; 'streservations', 'action' =&gt; 'queue')); ?&gt;&lt;/li&gt;
      &lt;li&gt;&lt;?php echo $this-&gt;Html-&gt;link(__('Calendar'), array('plugin' =&gt; false, 'controller' =&gt; 'streservations', 'action' =&gt; 'calendar')); ?&gt;&lt;/li&gt; 
  &lt;/ul&gt;
  </code></pre>
  
  <p>Script:</p>
  
  <pre><code>        $(document).ready(function() { 
              $('.menu li').click(function(e) {
                  $('.menu li.active').removeClass('active');
                  var $this = $(this);
                  if (!$this.hasClass('active')) {
                      $this.addClass('active');
                  }
                 // e.preventDefault();
              });
          });                       
  </code></pre>