Question: ```
$('#More').click(function(){
  $("div2").append("<div class=fieldBlock><label >Parameter Name: </label><select  type=text id=name2  name=name2 ><option></option></select> </br>");
});

```

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?

Answer: 
This shoud work for you. 

[Fiddle of it working.](https://jsfiddle.net/z6xk38uq/)

```
var count = 0;
$('#More').click(function(){
   $(".div2").append("<div class='fieldBlock'><label >Parameter Name: </label><select id='name" + count + "'  name='name" + count + "' ><option></option></select></div> </br>");
   count++;
});

```
```
var id = 1;

$('#More').click(function(){
    var str = "select" + id; //select1, select2, select3, etc....
    $("div2").append("<div class='fieldBlock'><label>Parameter Name: </label>
    <select  type='text' id='" + str + "' name='" + str + "' ><option>
    </option></select></br></div>");
    id++;
});

```