title: change css onload with javascript
body: <p>It's a simple javascript command to get the classname to change when the page loads. What am I doing wrong that it isn't working? <a href="http://jsfiddle.net/wtH2Y/4/" rel="nofollow">http://jsfiddle.net/wtH2Y/4/</a></p>
  
  <pre><code>&lt;html&gt;
   &lt;head&gt;
   &lt;style&gt;
     .away {
          margin: 30px 0 0 0 !important;
          position:fixed;
          -webkit-transition: margin 0.6s;
          -moz-transition: margin 0.6s;
          -o-transition: margin 0.6s; 
     }
     .in {
          margin:0;
          position:absolute;
     }
  
   &lt;/style&gt;
   &lt;script&gt;
       window.onload = function pre-loader() {
          document.getElementByClassName('away').className = 'in';
       };
   &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;div class="away"&gt;
  this should slide up when the page loads
  &lt;/div&gt;
  </code></pre>