Jquery append class based on condition
<p>I want to add a .less class to a tr element if my var <code>number</code> is &lt;100
This is what I've done so far, but it's not working as intended. Any help would be appreciated.</p>

<p>HTML CODE:</p>

<pre><code>&lt;table&gt; 
   &lt;thead&gt;
       &lt;tr&gt; 
           &lt;th&gt;RESULT&lt;/th&gt;
       &lt;/tr&gt; 
   &lt;/thead&gt; 
   &lt;tbody&gt;
   &lt;/tbody&gt; 
&lt;/table&gt;
</code></pre>

<p>JQUERY CODE:</p>

<pre><code>$(document).ready(function(){
  var number = 80;
  if(number&lt;100){
    $("tbody").append('&lt;tr class="less"&gt;');
  }else{
    $("tbody").append('&lt;tr&gt;');
  }        
  $("tbody").append('&lt;td&gt;'+number+'&lt;/td&gt;');
  $("tbody").append('&lt;/tr&gt;');
});
</code></pre>

<p>CSS CODE:</p>

<pre><code>tr.less {
  color:red;
}
</code></pre>

<p>(<a href="http://codepen.io/anon/pen/hkpvD" rel="nofollow">View it on codepen</a>)</p>
