upgrading jquery ui 1.8.5 to 1.10
i am using autocomplete in one of my project. I want to upgrade from ui 1.8.5 to 1.10.1 . i simple include the new new libraries of jquery and jquery ui and autocomplete is not showing the result menu, it just displays the text "2 results are available" and i can navigate among the result but menu for selection is not displayed. here is the code for autocomplete.
- function initLoc() {
- $(".location").each(function (index) {
- $(this)
- .bind("keydown", function (event) {
- if (event.keyCode === $.ui.keyCode.ENTER && !$(this).data("selectVisible")) {
- $(this).val('');
- }
- })
- .autocomplete({
- minLength: 3,
- delay: 100,
- autoFocus: true,
- source: function (request, response) {
- var term = request.term;
- if (term in cache) {
- response(cache[term]);
- return;
- }
- lastXhr = $.getJSON("/httphandlers/SearchLocationContents.ashx?city=" + city, request, function (data, status, xhr) {
- cache[term] = data;
- if (xhr === lastXhr) {
- response(data);
- }
- });
- },
- open: function () {
- $(this).data("selectVisible", true);
- },
- close: function () {
- $(this).data("selectVisible", false);
- },
- search: function () { if ($.trim(this.value) == "") return false; },
- select: function (event, ui) { },
- change: function (event, ui) {
- if (!ui.item) {
- var val = $(this).data("uiItem");
- if (typeof val === 'undefined') {
- val = '';
- }
- $(this).val(val);
- }
- }
- });
- });
- }
here is the image of the result.
I want to hide the text "2 results available" and menu should be displayed.