jQquery UI Autocomplete

jQquery UI Autocomplete

Hi guys!

I've used jquery-ui-1.8.20's autocomplete and it used to work fine. 
Then, I changed it to jquery-ui-1.9.1, and it failed.
I'm using not only autocomplete of jquery-ui-1.9.1, but other features too, like dialog, so I don't want to have 2 versions of jquery-ui in my project.


Here is my code:
  1.  $("#searchBox").ready(function () {

  2.         $('input[id$="txtPredictiveSearchBox"]').autocomplete({
  3.             minLength: 1,
  4.             delay: 200,
  5.             autoFocus: true,
  6.             highlight: true,

  7.             source: function (request, response) {
  8.                 var typeOfSearch = $(this.element.context).parent().parent().find('input:checked').val()
  9.                     == "GetStockSearchSuggestions" ? 0 : 1;
  10.                 var data = { searchText: request.term, count: 5, contextKey: typeOfSearch };
  11.                 $.ajax({
  12.                     type: "POST",
  13.                     url: "/srv/AutoSuggest.aspx/GetSuggestions",
  14.                     contentType: "application/json; charset=utf-8",
  15.                     dataType: "json",
  16.                     data: JSON.stringify(data),
  17.                     delay: 200,
  18.                     processdata: true,
  19.                     success: function (data) {
  20.                         response(data.d);
  21.                     },
  22.                     error: function (er) {
  23.                         response("An error occur tryig load autocomplete data. See the console for mor info.");
  24.                         console.log(er.responseText);
  25.                     }
  26.                 });
  27.             },
  28.             select: function (event, ui) {
  29.                 window.location.assign(ui.item.href);
  30.             },
  31.             open: function (event, ui) {
  32.                 $(this).autocomplete("widget")
  33.                 .find("ui-menu-item-alternate")
  34.                 .removeClass("ui-menu-item-alternate")
  35.                 .end()
  36.                 .find("li.ui-menu-item:odd a")
  37.                 .addClass("ui-menu-item-alternate");
  38.             },

  39.             focus: function (event, ui) { },

  40.             close: function () { }
  41.         });

  42.     });
Where  /srv/AutoSuggest.aspx/GetSuggestions is a WebMethod that returns an array of SearchItem:


  1.  public struct SearchItem
  2.         {
  3.             public string value;
  4.             public string text;
  5.             public string href;
  6.         }
On debug mode  I can see expected result isuccess  function's data.d prop, but
  1.  response(data.d);
generate nothing (doesn't show any data. ).

This code used to work with  jquery-ui-1.8.20. I haven't change anything in this code. I've changed only a version of  jquery-ui.

Any ideas?

Thanks in advance!

Gev