I want to add following rows using jquery
<p>I am creating a function for adding number of rows with input and select box in the table...
the structure of my page is....</p>

<pre><code>&lt;!--FROM HERE--&gt;
&lt;tr&gt;
  &lt;th&gt;Track 1:&lt;/th&gt;
  &lt;td&gt;&lt;input name="track[]" type="text" class="track" maxlength="150" onkeyup="lookup(this.value);" onblur="fill();"/&gt;
      &lt;div class="suggestionsBox" id="suggestions" style="display: none;"&gt;&lt;img src="images/upArrow.png" style="position: relative; top: -12px; left: 50px;" alt="upArrow" /&gt;
        &lt;div class="suggestionList" id="autoSuggestionsList"&gt;&amp;nbsp;&lt;/div&gt;
      &lt;/div&gt;&lt;/td&gt;
  &lt;td&gt;&lt;img width="27" height="27" src="images/error.png" alt="Error" class="error" id="errorcategory"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;th&gt;Category:&lt;/th&gt;
  &lt;td &gt;&lt;select name="category" id="category" style="width:318px;"&gt;
      &lt;?php getsongcategory($category); ?&gt;
  &lt;/select&gt;&lt;/td&gt;
  &lt;td&gt;&lt;img width="27" height="27" src="images/error.png" alt="Error" class="error" id="errorcategory"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
  &lt;th valign="top" style="padding-top:12px;"&gt;Poet:&lt;/th&gt;
  &lt;td &gt;&lt;select name="poetid" id="poetid" style="width:318px;"&gt;
      &lt;?php fetch_poet_name($poetid); ?&gt;
    &lt;/select&gt;&lt;br/&gt;&lt;br/&gt;
    &lt;input name="poetname" type="text" id="poetname"  maxlength="80" onkeyup="lookup(this.value);" onblur="fill();" style="display:none;"/&gt;
      &lt;div class="suggestionsBox" id="suggestions" style="display: none;"&gt;&lt;img src="images/upArrow.png" style="position: relative; top: -12px; left: 50px;" alt="upArrow" /&gt;
        &lt;div class="suggestionList" id="autoSuggestionsList"&gt;&amp;nbsp;&lt;/div&gt;
      &lt;/div&gt;&lt;/td&gt;
  &lt;td&gt;&lt;img width="27" height="27" src="images/error.png" alt="Error" class="error" id="errorpoetid" &gt;&lt;/td&gt;

&lt;/tr&gt;  
&lt;tr&gt;
  &lt;td colspan="3" id="track_1"&gt;&amp;nbsp;&lt;/td&gt;
&lt;/tr&gt;

&lt;!---TILL HERE-&gt;
</code></pre>

<p>I want to add this whole html next to <code>id="track_1"</code>. Hows that is possible?? As I have idea to add input and select in various ways....</p>

<pre><code>$("&lt;select/&gt;", {
    class: 'selectdoctor',
    name: 'selectdoctor' + i,
    id: 'selectdoctor' + i
}).appendTo("#prescriptiondiv").after("&lt;br/&gt;");


$("&lt;input/&gt;", {
    type: 'text',
    class: 'textinput',
    name: 'textinput' + i,
    id: 'textinput' + i
}).appendTo("#prescriptiondiv").after("&lt;br/&gt;&lt;input type='file' id='imageinput"+ i +"' class='imageinput' /&gt;&lt;br/&gt;&lt;br/&gt;");
</code></pre>
