title: Change element CSS style with click of button
body: <p>I'm trying to toggle the width of a div with a button.</p>
  
  <p>Desired effect would be clicking 'Big' makes the div width 100% and the button reads 'Small' to reduce the div back to 50%.</p>
  
  <p><a href="http://jsfiddle.net/tvXyL/" rel="nofollow">Live example - JS Fiddle</a></p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div class="block"&gt;
      block 50%
  &lt;/div&gt;
  &lt;button&gt;Big&lt;/button&gt;
  </code></pre>
  
  <p><strong>CSS</strong></p>
  
  <pre><code>.block {
      background: green;
      width: 50%;
      height: 300px;
      float: left;
      display: block;
      color: white;
  }
  button {
      clear: both;
      float: left;
      margin-top: 30px;
  }
  </code></pre>