title: How to play animation on div with javascript
body: <p>Here is my script so far:</p>
  
  <p>Html:
      </p>
  
  <pre><code>&lt;head&gt;
  &lt;link rel="stylesheet" type="text/css" href="mystyles.css"&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;div id="test"&gt;&lt;/div&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>Css:</p>
  
  <pre><code>#test {
      background-color: blue;
      width: 100px;
      height: 100px;
  }
  
  /* Here is the animation (keyframes) */
  @keyframes fading {
      0% { opacity: 1; }
      100% { opacity: 0; }
  }
  </code></pre>
  
  <p>But how do i get the css animation (keyframes) to play on the div #test using some javascript?</p>