title: Javascript to check if <td> is of a particular background colour
body: <p>Just getting to grips with javascript and jquery</p>
  
  <p>I am setting <code>backgroundColor</code> of a table cell based on its value. </p>
  
  <pre><code> $("td.ms-vb2").filter(function(index){return $(this).text() === "Yes";}).css("backgroundColor", "#81F79F");
   $("td.ms-vb2").filter(function(index){return $(this).text() === "No";}).css("backgroundColor", "#FE642E");
  </code></pre>
  
  <p>Could someone tell me how I would be able write an if-else statement where if the color is <code>#81F79F</code> do an alert and if the color is <code>#FE642E</code>, do another alert</p>
  
  <p>OR</p>
  
  <p>if the value in the cell is <em>Yes</em> do an alert and if the value in the cell is <em>No</em>, do another alert</p>
  
  <p>Many thanks</p>