title: Getting a bootstrap table row to change colors based off of json data
body: <p>I have a Bootstrap table with hover functionality, that populates with data retrieved from Twitch's JSON API.</p>
  
  <p>It works fairly well, but I want, based off of a certain JSON variable (whether or not the user is offline) for the table row to change colors. </p>
  
  <p>The full code is <a href="https://codepen.io/naregjan/pen/dNMpEW?editors=1111" rel="nofollow noreferrer">here</a>, and the most relevant JS snippets is below:</p>
  
  <pre><code>if (gameContent == null) {
        statusText = "Offline...";
        gameText = "Nothin'";
        row.addClass("offline");
        $("td", row).each(function() {
          $(td).addClass("offline");
        });
  }
  </code></pre>
  
  <p>The <code>offline</code> class has a different background color. </p>
  
  <p>The thing is, with row.addClass down being commented out, everything else works, but if those things aren't commented out, then those rows disappear completely, including text. And it seems like (through the Inspector) the class isn't being added to the tr or td elements at all, but for some reason, the text is getting wiped instead. I just feel like I'm looking at the wrong portion of the code. Any ideas?</p>