title: If statement being ignored
body: <p>My <code>if</code> statement is being ignored. I'm pretty new to coding.<br>
  I feel like I am missing a semicolon or a parenthesis or something small like that.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
    function showdiv() {     
         if(document.getElementById("nav-wrap-2").style.opacity ='.5')
              {
              document.getElementById("nav-wrap-2").style.opacity ='0';
              document.getElementById("content-wrap").style.marginLeft ='250px';
              }
         }
  &lt;/script&gt;
  </code></pre>
  
  <p>Edit: Changing = to == in the if statement was the correct solution, however it did not solve the whole problem. I also had to get rid of the quotes around the '.5' in the if statement.
  Derp.</p>