title: Get style in javascript
body: <p>I'm trying to resize a <code>div</code> when the size of the div is 50% to 100%. But when I try to <code>console.log</code> the current size of the <code>div</code> it just logs whitespace... Whats wrong?</p>
  
  <pre><code>window.onload = function() {
      //declare vars
      var fullbox = document.getElementById('box'),
          minBut = document.getElementById('down');
  
      minBut.onclick = function() {
          if(fullbox.style.width == "50%") {
              fullbox.style.width = "100%";
          } else {
              fullbox.style.width = "50%";
          }
      }
  }
  </code></pre>