title: datatables selected row background color
body: <p>I'm a newbie so bear with me; I'm using jQuery datatables plugin and I need to select a row and change the color of the selcted row. I followed this <a href="http://datatables.net/examples/api/select_single_row.html" rel="nofollow noreferrer">example</a> from datatables but it doesn't work for me.</p>
  
  <p>This is how i initialize the table:</p>
  
  <pre><code>var oTable = $("#rolesTable").dataTable({
      // "bJQueryUI": true,
      "iDisplayLength": 25,
      "aoColumns": [
          null,
          {"sType": "role"},
          null,
          null
      ],
      "aaSorting": [[1, "desc"], [0, "asc"]]
  });
  </code></pre>
  
  <p>and this is the code for the click event and the CSS class:</p>
  
  <pre><code>&lt;style&gt;
  .row_selected tr {
      background-color: black;
  }
  &lt;/style&gt;
  </code></pre>
  
  
  
  <pre><code>$("#rolesTable tbody tr").click(function (event) {
      $(oTable.fnSettings().aoData).each(function () {
          $(this.nTr).removeClass('row_selected');
      });
      $(event.target.parentNode).addClass('row_selected');
  });
  </code></pre>
  
  <p>Sorry, I added the click handler</p>