title: dynamically creating td cell with paragraph in jquery
body: <p>i am trying to create a table dynamically in such a way the generate code be like this:</p>
  
  <pre><code>        &lt;table id="TblInvoiceList"&gt;
  
      &lt;tr&gt;&lt;td&gt;name&lt;/td&gt;&lt;td&gt;amount&lt;/td&gt;&lt;/tr&gt;
      &lt;tr class="white"&gt;&lt;td colspan="2"&gt;&lt;p&gt;bla bla&lt;p&gt;&lt;/td&gt;&lt;/tr&gt;
  
  &lt;/table&gt;
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>createTable: function () {
      var lastRow = $('#TblInvoiceList tr:last');
  
      var newRow = $('&lt;tr&gt;');
      newRow.append($('&lt;td&gt;').text($('input.Name').val()), $('&lt;td&gt;').text($('input.GrossAmount').val()));
              lastRow.before(newRow);
  
      var hiddenRow = $('&lt;tr&gt;');
      hiddenRow.append($('&lt;td colspan="3"&gt;'+ '&lt;p&gt;').text('bla bla'));
      newRow.after(hiddenRow);}
  </code></pre>
  
  <p>But de generated code doesnot have the <p> tag for the td cell with colspan.
  How can i generate the following:</p>
  
  <pre><code>&lt;td colspan='2'&gt;&lt;p&gt; bla bla &lt;/p&gt;&lt;td&gt;  
  </code></pre>