How to increment a id when appending elements using jquery?
<pre><code>$('#More').click(function(){
  $("div2").append("&lt;div class=fieldBlock&gt;&lt;label &gt;Parameter Name: &lt;/label&gt;&lt;select  type=text id=name2  name=name2 &gt;&lt;option&gt;&lt;/option&gt;&lt;/select&gt; &lt;/br&gt;");
});
</code></pre>

<p>I have created a button that appends a parameter drop down select when the button is clicked. I want to give each appended select a different id. For example, when  button is pressed for first time, that select will have id name2, then if button is pressed again, the new append select will have id name3, and so forth. Any way of doing this?</p>