nKognito nKognito - 6 months ago 34
Javascript Question

Autocomplete experimental messages option, no results

I moved to jQuery UI 1.9 and have some problems with Autocomplete control. As written here they added option called

messages
that actually shows "No results" or results count information under the control. The problem that I can't any info about its behaviour find in the manuals.

How can I disable that option? Thank you

Answer

Indeed not in the API documentation to the date of my answer... You can customize it this way:

  jQuery(...).autocomplete({
     messages : {
      noResults : 'No results found.',
      results : function(count) {
        return count + (count > 1 ? ' results' : ' result ') + ' found';
      }
    },
  });