title: jQuery DataTables iterate over rows and change cell background
body: <p>I am trying to iterate over all cells in a column (column index 1) in a DataTable and change the background color based on cell value using the following code:</p>
  
  <pre><code>var table = $('#my_table').DataTable( {...});
  console.log("next, iterate over rows in table: "+table);
  table.rows().every( function ( rowIdx, tableLoop, rowLoop ) { 
      console.log("looping over rows");
      var cell = table.cell({ row: rowIdx, column: 1 }).node();
      if (cell.data() == 'mouse'){
          $(cell).css('background-color', 'orange');
      }
  });
  console.log("finished iterating over rows ");
  </code></pre>
  
  <p>The table is displaying the data fine. 
  However the console log prints:</p>
  
  <pre><code>&gt;&gt;next, iterate over rows, table: [object Object]
  &gt;&gt;finished iterating over rows
  </code></pre>
  
  <p>ie the </p>
  
  <pre><code>table.rows().every( function (...){...} 
  </code></pre>
  
  <p>is not entered. I copied and pasted from DataTables examples and I have no idea why it is not being executed. </p>
  
  <p>The only thing I can think of is that the DataTables docs here: <a href="https://datatables.net/reference/api/rows().every()" rel="nofollow noreferrer">https://datatables.net/reference/api/rows().every()</a> mention- Iterate over each <strong>selected</strong> row. None of the rows in the table are <strong>selected</strong>, I just want to loop through every row (and change cell color) regardles if it is selected or not.</p>
  
  <p>Note I also tried:</p>
  
  <pre><code>table.rows().eq(0).each( function ( index ) {
      var row = table.row( index );
      var data = row.data();
      console.log(data)
  });
  </code></pre>
  
  <p>And this is not executed either (console.log doesn't print anything from inside the function).</p>