appending dynamic php menus using jquery
<p>I can append html form elements to a table with jquery.  How can I append menus populated with php/my sql query so that the php menu is between td and input... below??</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function() {
      $("#link td input.rdelete").live("click", function () {
              $(".newrow").attr("disabled",false);
            var srow = $(this).parent().parent();
                        srow.remove();                  
            });
});


function AddNew() { 
           if($("#link tr").length &gt; 12) {
              $(".newrow").attr("disabled",true);
           }
           var count = 0;
           count += 1;

        $("#link").append('&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt; &lt;input type=\"button\" value = \"Delete\" class=\"rdelete\"/&gt;&lt;/td&gt;&lt;/tr&gt;' );
           }
&lt;/script&gt;
</code></pre>

<p>The php menu is:</p>

<pre><code>&lt;select name="sub_discipline" id="sub_discipline"&gt;
            &lt;option&gt;Select Sub-discipline...&lt;/option&gt;
            &lt;?php 
$query = mysql_query("SELECT * from sub_discipline ORDER BY sub_discipline_name ASC");
while ($row = mysql_fetch_assoc($query)){
?&gt;
            &lt;option value="&lt;?php echo $row['sub_discipline_pk']; ?&gt;"&gt;&lt;?php echo $row['sub_discipline_name']; ?&gt;&lt;/option&gt;
            &lt;?php 
}
?&gt;
          &lt;/select&gt;
</code></pre>

<p>EDIT:  Thanks to Explosion Pills I now have:</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function() {
$("#jMenu").jMenu();
      $("#link td input.rdelete").live("click", function () {
              $(".newrow").attr("disabled",false);
            var srow = $(this).parent().parent();
                        srow.remove();                  
            });
});


    function AddNew() { 
               if($("#link tr").length &gt; 12) {
                  $(".newrow").attr("disabled",true);
               }

    $.getJSON('../scripts/link_menu.php', function (json) {
       $("#links").empty();
       $.each(json, function () {
           $("#links").append(new Option(this.link_title));
       });
    }); 

            $("#link").append('&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;select name="links[]" id="links"&gt; &lt;/select&gt;&lt;input type=\"button\" value = \"Delete\" class=\"rdelete\"/&gt;&lt;/td&gt;&lt;/tr&gt;' );

    &lt;/script&gt;
</code></pre>

<p>Problem is that only the first appended menu is being populated.</p>
