title: How to add an ID attribute to a table tr through jQuery
body: <p>I have a table that is constructed using the WordPress Settings API. The table is outputted like this:</p>
  
  <pre><code>&lt;tr&gt;
      &lt;th scope="row"&gt;&lt;label for="feedblitz_rss_link"&gt;FeedBlitz RSS URL:&lt;/label&gt;&lt;/th&gt;
      &lt;td&gt;&lt;input class="regular-text" type="text" id="feedblitz_rss_link" name="aswfe_options[feedblitz_rss_link]" value="" /&gt;
      &lt;br /&gt;
      &lt;span class="description"&gt;Enter the URL to your Feedblitz RSS Feed.&lt;/span&gt;&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>In each table row there is a form field that contains an ID. I would like to take that ID and assign it to the <code>&lt;tr&gt;</code> of the row, so that the row would look like this:</p>
  
  <pre><code>&lt;tr id="feedblitz_rss_link"&gt;
      &lt;th scope="row"&gt;&lt;label for="feedblitz_rss_link"&gt;FeedBlitz RSS URL:&lt;/label&gt;&lt;/th&gt;
      &lt;td&gt;&lt;input class="regular-text" type="text" id="feedblitz_rss_link" name="aswfe_options[feedblitz_rss_link]" value="" /&gt;
      &lt;br /&gt;
      &lt;span class="description"&gt;Enter the URL to your Feedblitz RSS Feed.&lt;/span&gt;&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>I want to do this so that then I can get at each table row through jQuery and hide or display each row that is needed.</p>
  
  <p><strong>== Update ==</strong></p>
  
  <p>I have the table now assigning dat-rel attributes to each table row thanks to @Mike &amp; @Dennis using this code:</p>
  
  <pre><code>$(".aswfe-admin .form-table tr input").each(function() {
      var id = $(this).attr("id");        
      $(this).parent().parent().attr("data-rel", id);
  });
  </code></pre>
  
  <p>Now I seem to be having issues getting at each row and hiding them. I thought I could use something like this but this code hides the whole table, whereas I only want to hide the specific row with the specific <code>data-rel</code> attribute.</p>
  
  <pre><code>$(".form-table tr").data("rel", "feedblitz_rss_link").hide();
  </code></pre>