title: Change/increment title of td with for loop - JQuery
body: <p>I need to assign numbers to my table cells, which increment from cell to cell. I have tried a forloop but am having trouble assigning the incremented counter to the cell's title after each loop. I have this code -</p>
  
  <pre><code>$(function(){
  var row = $('#seat_map tr:last td.freeSeat')
  for(i=0; i&lt;row.length; i++){
          row.attr('title', i);   
      }
  });
  </code></pre>
  
  <p>This code only assigns the final value of i after the loop has completed, to all the cells' titles... Instead of assigning '1, 2, 3' etc to the titles. I should perhaps add that the table is dynamically generated using jquery also. Apologies for the vague title and description - I tried my best!</p>
  
  <p>Thanks</p>