JSFiddle - React, Tailwind, and code Playground

by toofle

HTML

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<table id='tbl1' style="width:100%">
  <tr>
    <th>Name</th>
    <th>Location</th> 
    <th>Amount in kg</th>
  </tr>
  <tr>
    <td>Whole wheat</td>
    <td>Line 1</td>
    <td>1237</td>
  </tr>
  <tr>
    <td>Whole wheat</td>
    <td>Line 2</td> 
    <td>1341</td>
  </tr>
</table>

JavaScript

table = $('#tbl1').find('td:nth-child(3)').each(function() {
	val = parseInt($(this)[0].innerText, 10);
  if (val > 1300) {
  	$(this).css({"background-color": "green"});
  }
  else {
  	$(this).css({"background-color": "red"});
  }
});