I need to add dynamically a row in jquery, this is my code: 

```
var row = $('<tr />')
    .append($('<td />'))
    .append($('<td>' + response.nome + '</td>'))
    .append($('<td />', {
        style: "text-align:center"
    }).append($('<input />', {
        type: 'image',
        src: 'nienteico.png',
        'class': 'ajaxEdit',
        id: '1.' + response.row_id
    }).css({
        cursor: 'pointer',
        width: '40px',
        height: '40px',
    }).click(function() {
        cambiastato('1.' + response.row_id);
    })));

```

In particular, as regards the last element i'm expecting to get 'id' attribute and one 'onclick function'. Something like: 

```
<tr>
<td></td>
<td>uytredsgfh</td>
<td style="text-align:center">
<input type="image" src="nienteico.png" style="cursor:pointer; width:40px; height:40px" id="1.15" class="ajaxEdit" onclick="cambiastato(1.15)"> 
</td>
</tr>

```

The first two elements are correctly written, but unfortunally this is what i get for the last one (id attribute and onclick function missed!)

```
<td style="text-align:center">
<input type="image" src="nienteico.png" class="ajaxEdit" style="cursor: pointer; width: 40px; height: 40px;">
</td>

```

Any help or suggestions? Thanks