title: Change vertical nav to horizontal using jquery
body: <p>Basically I have an unordered list acting as my navigation on a one page website sorted by sections. These sections or panels are full width and height of the browser window.</p>
  
  <p>In the first panel, this list is vertical but when the user scrolls down the page to section two (i.e. the second panel from the top of the browser window) I'd like to change the style of it so that it fixes to the top of the browser window and becomes a horizontal nav instead of a vertical one. I don't want to duplicate the list if possible.</p>
  
  <p>I'm not great at jQuery and don't really know where to start. Any help would be great.</p>
  
  <p>This is my current code that gets the width and height of the browser window and displays a full screen div:</p>
  
  <pre><code>function fitElements(){
  var height=$(window).height();
  var width=$(window).width();
  $('.panel').css('height',height);
  $('.panel').css('width',width)
  };
  </code></pre>