Autocomplete experimental messages option, no results

回眸只為那壹抹淺笑 提交于 2019-12-06 04:22:20

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';
      }
    },
  });

NOTE: As commented by user actimel, customising is ok but do not hide it as it is part of the accessibility feature (blind users for example).

I have been digging around this a bit and found the following:

The message is part of jQuery UI accessibility functionality and is actually never supposed to be shown (visible) and only processed by screen-readers.

All your problems will go away if you use some of the jQuery UI stylesheet files that will hide these elements for you.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!