i create a select element dynamically using javascript like this code

```
typehtml = '<select id="select"><option value="first">All      </option>';
$.ajax({
    type: 'POST',
    url: 'web service url',
    data: "web service parameters",
    dataType: 'xml',
    success: function(response) {
        $(response).find('IssueType').each(function() {

            var namei = $(this).find('Name').text();
            var id = $(this).find('Id').text();

            typehtml += '<option value="' + id + '" >' + namei + '</option>';

        });
        typehtml += '</select>';
        document.getElementById("typediv").innerHTML = typehtml;

    },
    error: function(error) {
        alert(error);
    }
});

```

and i assign the selected index changed for this select element like this

```
$(function() {
    $("#select").change(function() {
        var selected = $(this).val();

    });
});

```

but when i select a value this function does not fire, does any one know why?