title: JQuery How to add table cell to a table row
body: <p>I'm trying to use jQuery to dynamically add cells to my table row.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;table class="col-md-12" id="location-table"&gt;
      &lt;tr id="location-row"&gt;
          &lt;td&gt;
              &lt;label&gt;
                  &lt;input type="radio" id="location-radio"  value="other" /&gt;
                  Other location
              &lt;/label&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>JS/JQuery (I've tried both of these methods):</p>
  
  <pre><code>$('&lt;td&gt;&lt;label&gt;&lt;input type="radio" id="location-radio" value="test" /&gt;Test&lt;/label&gt;&lt;/td&gt;').appendTo('#location-row');
  
  $('#location-row').append('&lt;td&gt;&lt;label&gt;&lt;input type="radio" id="location-radio" value="test" /&gt;Test&lt;/label&gt;&lt;/td&gt;');
  </code></pre>
  
  <p>All help is very much appreciated.</p>