jQuery(document).ready(function($){// Loop through each row of the table $('table tr').each(function(){var row=$(this);// Get values from the specific columns var priceMor=parseFloat(row.find('td:nth-child(2)').text().replace(/,/g,''));var priceAft=parseFloat(row.find('td:nth-child(3)').text().replace(/,/g,''));var changePercent=parseFloat(row.find('td:nth-child(7)').text().replace(/,/g,''));// If Price(Mor) is greater,set green color,else red if (priceMor>priceAft){row.find('td:nth-child(2)').css('color','green')}else{row.find('td:nth-child(2)').css('color','red')}// If Price(Aft) is greater,set green color,else red if (priceAft>priceMor){row.find('td:nth-child(3)').css('color','green')}else{row.find('td:nth-child(3)').css('color','red')}// If Change % is positive,set green color,else red if (changePercent>0){row.find('td:nth-child(8)').css('color','green')}else{row.find('td:nth-child(8)').css('color','red')}})});