title: Bootstrap Navpills Steps ...how to make the browser jump to the top of the page on click?
body: <p>I have a "Steps" system where people can click a button to proceed to the next step. The problem is that when the content is really long, the page stays "down there" and then people have to scroll up to see the content of that next tab and back down to proceed to the next step again.</p>
  
  <p>Is there a simple way to make it jump to a page anchor like <code>#</code> and back up to the <code>&lt;h4 class="list-group-item-heading"&gt;Step 2&lt;/h4&gt;</code> when the new tab is activated? Here is the jQuery:</p>
  
  <pre><code>$(document).ready(function() {
  
      var navListItems = $('ul.setup-panel li a'),
          allWells = $('.setup-content');
  
      allWells.hide();
  
      navListItems.click(function(e)
      {
          e.preventDefault();
          var $target = $($(this).attr('href')),
              $item = $(this).closest('li');
  
          if (!$item.hasClass('disabled')) {
              navListItems.closest('li').removeClass('active');
              $item.addClass('active');
              allWells.hide();
              $target.show();
          }
      });
  
      $('ul.setup-panel li.active a').trigger('click');
  
      // DEMO ONLY //
      $('#activate-step-2').on('click', function(e) {
          $('ul.setup-panel li:eq(1)').removeClass('disabled');
          $('ul.setup-panel li a[href="#step-2"]').trigger('click');
          $(this).remove();
      })   
      // DEMO ONLY //
      $('#activate-step-3').on('click', function(e) {
          $('ul.setup-panel li:eq(2)').removeClass('disabled');
          $('ul.setup-panel li a[href="#step-3"]').trigger('click');
          $(this).remove();
      }) 
  });
  </code></pre>
  
  <p>And a jsFiddle: <a href="http://jsfiddle.net/asy4267m/1/" rel="nofollow">http://jsfiddle.net/asy4267m/1/</a></p>
  
  <p>I tried to do something like <code>$('.list-group-item-heading').focus();</code> but that didn't work.</p>
  
  <p>Note it obviously works best if the browser window is not full size and therefor the scrolling is forced.</p>