title: Generating td elements with background color jquery
body: <p>I am trying to give a color to a generated td element (status of a project) but it's not working , I am getting the data but no color. How do I fix this?</p>
  
  <p>Here's my code :</p>
  
  <pre><code>         function(data, status) {
                          var items = "";
                          data = $.parseJSON(data);
                          if (data.toString() !== "") {
                              $.each(data, function(index, item) {
                                  items += "&lt;tr class='info'&gt;";
  
                                  if(item.STATUSPROGRESS ==="OK"){
                                      items+='&lt;td bgcolor="#00CC66"&gt;';
                                  }
                                  else if(item.STATUSPROGRESS === "NOT OK"){
                                      items+="&lt;td bgcolor='#FF0000'&gt;";
                                  }
                                  else if(item.STATUSPROGRESS === "STATUS REQUIRED"){
                                      items+="&lt;td bgcolor='#FFEC3D'&gt;";
                                  }
                                  else if(item.STATUSPROGRESS === "ACTION REQUIRED FROM COMPANY"){
                                      items+="&lt;td bgcolor='#3DB1FF'&gt;";
                                  }
                                  else if(item.STATUSPROGRESS === "ACTION REQUIRED FROM CUSTOMER"){
                                      items+="&lt;td bgcolor='#FF8B3D'&gt;";
                                  }
                                  else{
                                      items+="&lt;td bgcolor='#FFFFFF'&gt;";
                                  }
  
  
                                  items += item.PROJECTID + "&lt;/td&gt;";
                                  items += "&lt;td&gt;" + item.DESCRIPTION + "&lt;/td&gt;";
                                  items += "&lt;td&gt;" + item.CUSTOMER + "&lt;/td&gt;";
                                  items += "&lt;td&gt;" + item.ACCMANAGER + "&lt;/td&gt;";
                                  items += "&lt;/tr&gt;";
  
                              });
                          }
                          $("#myTable tbody").append(items);
                          $("#myTable").trigger("update");
  
  
  
                      });
  </code></pre>