title: jQuery Table rows drag and drop plugin
body: <p>I'm using <a href="http://www.isocra.com/2008/02/table-drag-and-drop-jquery-plugin/" rel="nofollow noreferrer">this</a> plugin to enable drag and drop table rows on a page.  The plugin comes with a serialize function, which passes the ID of each table row to an AJAX function, like this:</p>
  
  <pre><code>serializeTable: function(table) {
      var result = "";
      var tableId = table.id;
      var rows = table.rows;
      for (var i=0; i&lt;rows.length; i++) {
          if (result.length &gt; 0) result += "&amp;";   
          var rowId = rows[i].id;   
          if (rowId &amp;&amp; rowId &amp;&amp; table.tableDnDConfig &amp;&amp; table.tableDnDConfig.serializeRegexp) {
              rowId = rowId.match(table.tableDnDConfig.serializeRegexp)[0];
          }
  
          result += tableId + '[]=' + rowId;
      }
      return result;
  },
  </code></pre>
  
  <p>Unfortunately, the HTML ID of the row is not of much use to me.  Instead, I'm trying to pass the value contained within the first TD of the row, but as of yet I'm not having much luck.</p>
  
  <p>I've been trying to replace the rowId variable with something like this, but all it returns is 'undefined'.</p>
  
  <pre><code>var val = $(rowId + "td:nth-child(1)").value; 
  </code></pre>
  
  <p>Is there a simple way to do this?  Once I get the correct values to the PHP script I will be fine, but I am still quite inexperienced with javascript.</p>
  
  <p>Any advice would be appreciated.  Thanks.</p>