title: how to add css to json response
body: <p>On clicking the td class="bgimg", I'm calling another function. How do I add a class to the td which I clicked?</p>
  
  <pre><code>/*This function creates a list of tabs*/
  BCL.onSearchResponse = function(jsonData) {
      BCL.jsonData = jsonData;
      var str = "&lt;table id=\"playlistTable\" cellspacing=\"1\"&gt;&lt;tbody&gt;&lt;tr&gt;";
      var html = "";
      for (var i = 0; i &lt; jsonData["items"].length; i++) {
          var playlist = jsonData["items"][i];
          html = "&lt;td class=\"bgimg\" onclick=\"BCL.onPlaylistSelect(" + i +")\"&gt;{{name}}&lt;/td&gt;";
          str += BCL.markup(html,playlist);
      }
      str += "&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;";
      //console.log(str);
      document.getElementById("results").innerHTML = str;
      // load the first playlist
      BCL.onPlaylistSelect(0);
  }
  </code></pre>