Jquery Mobile Database connection, AJAX and data format (Table Cell formating)

Jquery Mobile Database connection, AJAX and data format (Table Cell formating)

Based on some wonderful tutorials, I have been able to set-up a database (Mysql), and use AJAX, PHP and html5, to pull data from my bus schedule in a database, I learned how to do an array, and this all works great..However, for some reason, using CSS and javascript I have NOT been able to format a cell a different coloe based on the value that is populated to the Table cell from the database. For example, I have an array that loops through a database table, and then populates my HTML table based on the values I've chosen, as its getting the data, one od the celles is the staus, "Running" or "Cancelled", based on what the cell being populated with this, how to I made the Table Cell background GREEN if the value is RUNNING, and RED if the value is cancelled. 

Thanks you SO much in advance.