title: apply only one condition
body: <pre><code>if(bmi &lt; 18.5 )
  {
      element1.backgroundColor =  colour;
      $(document).ready(function(){
        $(".C_underArrow").show();
         });
  }
  
  else if (bmi&gt;= 18.5 &amp;&amp; bmi&lt;= 24.9)
  {
    element2.backgroundColor =  colour;
     $(document).ready(function(){    
       $(".C_normalArrow").show();
      });
  }
  </code></pre>
  
  <p>Am trying to color a table rows.</p>
  
  <p>Depending on an input " bmi " .. decide which condition will use for example first condition , then coloring the element1 .</p>
  
  <p>When i change the input value .. and get in the another condition and coloring element2 .. it keeps the element1 colored.</p>
  
  <p>i want to color one row at every new input value </p>
  
  <p>how can i solve it ?</p>
  
  <p>Edit: Adding HTML code</p>
  
  <pre><code>&lt;table class="C_resultTable"&gt;
  
  
  &lt;tr id="id1"&gt;
  &lt;td &gt;
  &lt;img id="ID_underArrow" class="C_underArrow" width="30" height="30" src="right-arrow.gif" /&gt;
  &lt;/tr&gt;
  &lt;/td&gt;
  
  
  &lt;tr id="id2"&gt;
  &lt;td &gt;
  &lt;img id="ID_normalArrow" class="C_normalArrow" width="30" height="30" src="right-arrow.gif" /&gt;
  &lt;/tr&gt;
  &lt;/td&gt;
  
  
  &lt;tr id="id3"&gt;
  &lt;td &gt;
  &lt;img id="ID_overArrow" class="C_overArrow" width="30" height="30" src="right-arrow.gif" /&gt;
  &lt;/tr&gt;
  &lt;/td&gt;
  
  
  &lt;tr id="id4"&gt;
  &lt;td &gt;
  &lt;img id="ID_ObeseArrow" class="C_ObeseArrow" width="30" height="30" src="right-arrow.gif" /&gt;
  &lt;/td&gt;
  &lt;/td&gt;       
  
  &lt;/table&gt;
  </code></pre>