title: jQuery How to change CSS if value is greater than 1
body: <p>Alright so there is already an answer to this but I am trying to do the exact same thing, but I've same another css class to "call" this script.</p>
  
  <p>Example: I have this calling to messages, when the content inside messages is over 0 it will change the background color, what I would like to do is change the bottom border on ".root_panel" to the same color as the messages. I'm very new to JavaScript.</p>
  
  <p><strong>Script:</strong> </p>
  
  <pre><code>$(document).ready(function () 
  {
     $(".messagess").each(function() 
      {
        var el = $(this);
        var value = parseFloat(el.text());
        if (value &gt; 0) 
           {
              el.css("background","#6E8A75").css("color","#fff");
           }
        else
           {
              el.css("color", "#fff"); 
           }
      }); 
  });
  </code></pre>