add a textbox onclick dropdown value other in jquery?
<p>I am facing a problem with jquery.</p>

<p>I have a div with 4 drop down list and I have an "add more" button.</p>

<p>When I click on "add more" button, another instance of the same div is created just above the "add more" button. I did it via jQuery <code>append()</code> method and it is successfully working, but my problem is that the requirement says that when i select "Other" from the drop down a text box should open where I will fill the name which is not in the list.</p>

<p>I can do this but when i click on "add more" and another instance is created, When I select "other" from the dynamically created listbox the text box is not created because their id becomes same and I know that id can not be same.</p>

<p>Similarly, in rest of the dropdown happens. If i do it by class name then creates all the text box at a time. I do not want this.
I hope you understood my problem.
Please help me and give me a solution how to manage it.</p>

<p>Thanks everybody and thanks stackoverflow.com</p>

<p><strong>Update:</strong></p>

<pre><code>$(document).ready(function() { 
    alert('here'); 
    var content=$("#course").html(); 
    var content1=$("#emp").html(); 
    alert(content); 
    $("#add").click(function(){ 
        var n=$("#course .count").length; 
        if(n!=3){
            $("#course").append(content);
        }
        if(n==2){
            $("#add").hide();
        } 
    });
});
</code></pre>

<p>my html is like</p>



dropdown1
dropdown1
dropdown1
dropdown1


<p>add more button</p>

<p>when i select dynamically generated dropdown by append()...the textbox for 'other' not appears means unable to handle event on dynamically generated div thanks  </p>
