I am new to jQuery and I am trying to bring up another identical drop down menu that appears every time the user clicks a button. I thought this would work, where #append is the button id and #foo is the dropdown id:
<script type="text/javascript">
$(document).ready(function(){
$("#append").click(function(){
$("#foo").append($("#foo"));
});
});
</script>
However, instead of duplicating the original drop-down list, it makes it disappear! What am I doing wrong?
source
share