title: Adding style to Header when div is clicked using Javascript
body: <p>My intent is to add a class to the header when a div is clicked. I have included the website I'm working with, just to make thing's easier:</p>
  
  <p>URL - <a href="http://itsmontoya.com/work/iM/" rel="nofollow">http://itsmontoya.com/work/iM/</a></p>
  
  <p>I have added a class 'expanded' to the header. This is to show how the navigation should look after the button has been pressed. I created a simple Javascript which is supposed to provide an alert when I click the button. I can't seem to get this to work. Any ideas of what I did wrong?</p>
  
  <p>Thanks!</p>
  
  <p><strong>EDIT</strong> - I was able to get the alert to properly work when clicking the button div. I'm very close to having this complete! :) Now I'm getting stuck with the variable not passing correctly. </p>
  
  <pre><code>&lt;script type= "text/javascript"&gt;
  var expanded = false;
  function btnClick(){
      alert('The variable expanded is '+expanded);
      if(expanded === false) {
          document.getElementById("header").className = "expanded";
          var expanded = true;
      } else {
          document.getElementById("header").className.replace(/\bexpanded\b/,'');
          var expanded = false;
      }
  };
  &lt;/script&gt;
  </code></pre>
  
  <p>I'm updating the ftp server now :)</p>