title: Javascript:: Trigger firstChild element by class
body: <p>This code would speak for it self and explain what I'm trying to achieve...</p>
  
  <pre><code>&lt;style&gt;
  .red{background:red}
  .blue{background:blue}
  &lt;/style&gt;
  
  &lt;div id=test&gt;
      &lt;button&gt;1&lt;/button&gt;
      &lt;button&gt;2&lt;/button&gt;
  &lt;/div&gt;
  
  &lt;script&gt;
  var firstBtn=document.getElementById("test").firstChild.className;
  
  (firstBtn!="red")?firstBtn="red":firstBtn="blue";
  &lt;/script&gt;
  </code></pre>
  
  <p>Here is the jsFiddle :
  <a href="http://jsfiddle.net/hnfeje2q/" rel="nofollow">http://jsfiddle.net/hnfeje2q/</a></p>
  
  <p>Very simple but since I'm new to JavaScript...</p>
  
  <p>Thanks!</p>