title: Replace entire table row (including <tr></tr>) using JQuery
body: <p>I've looked at other examples here, but they seem to be replacing the contents of a <code>&lt;tr&gt;</code> and not the entire row including the <code>&lt;tr&gt;</code>.</p>
  
  <pre><code>&lt;table&gt;
      &lt;tr style="display:block"&gt;
          &lt;td id="someid"&gt;Test&lt;/td&gt;
          &lt;td&gt;Some text&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>The following code seems to only replace the innerHTML of the <code>&lt;tr&gt;</code>. I need to replace everything, including the <code>&lt;tr&gt;</code> so that the row will collapse. Can anyone confirm that this code does or does not completely replace the row:</p>
  
  <pre><code>var newtr = "&lt;tr style='display:none'&gt;&lt;td id='someid'&gt;&lt;/td&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;"
  $("td#someid").parent().html(newtr);
  </code></pre>
  
  <p>The reason why I don't think the entire <code>&lt;tr&gt;</code> is being replaced is because the row doesn't collapse - though I have tested the HTML outside of JQuery and it works fine.</p>