.change doesn't work

.change doesn't work

I create a combox dynamically and I want to to call another function when the values change in the combobox.

  1. $("#table tr:last").after("<tr><td width='20%'><select type='text' id='legcomb-" + txtid + "'></select></td><td width='19%'><select id='subcomb-" + txtid + "'></td></tr>


  1. function __call(_id) {
  2.     $("#legcomb-" + _id).change(function () {
  3.         alert("changed!");
  4.     });
  5. });
  6. }