title: Adding rows dynamically to an html table with no rows
body: <p>I am using this to add a row dynamically to a table:</p>
  
  <pre><code>   $('#myTable tr:last').after('&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;a&lt;/td&gt;&lt;/tr&gt;');
  </code></pre>
  
  <p>but it doesn't seem to work if the table has no records:</p>
  
  <pre><code>&lt;table id="myTable" class="altTable"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;
                  Col1
              &lt;/th&gt;
              &lt;th&gt;
                  Col2
              &lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>what would be the right selector here to add a row that would work if there are 0 or > 0 rows existing ?</p>