title: JQuery - Select function on autocomplete not getting called?
body: <p>I have the following code to add autocompletion to my textBox, autocompletion shows up and everything works, but when a user selected an item the select callback does not get called?
  Any solutions?</p>
  
  <pre><code>$(function() {
  
  $("#txtItem").autocomplete({
      minLength: 1,
      source: function (request, response) {
          $.ajax({
              url: "/Correct url here",
              dataType: "json",
              data: {
                  term: request.term
              },
              success: function (data) {
                  response($.map(data, function (item) {
                      return {
                          label: item.Name,
                          value: item.Name
                      }
                  }))
              },
              select: function (event, ui) {
                  alert("sdfsdf");
                  //$("#txtItemId").val(ui.item.value.ItemId);
              }
          })
      }
  })
  
  }
  </code></pre>