How to Use The jQuery Autocomplete Widget | HTML Goodies

How to Use The jQuery Autocomplete Widget (With Examples)

Written By
RG
Rob Gravelle
Jan 29, 2018
4 minute read

Autocomplete text fields have been a mainstay of desktop applications for a long time now. They are commonly found in programs such as Microsoft Outlook, development IDEs, and any other app where the user might benefit from having the program suggest possible values for an input field.

autocomplete_in_outlook (17K)

It wasn’t long before autocomplete widgets for the Web began to make their way onto pages and apps all over, for instance, in Facebook’s messaging system. So much so, that choosing one to use in your own apps can be a tall order. There are dozens of jQuery-based autocomplete widgets alone. Speaking for myself, my go-to is jQuery’s own implementation: the jQuery UI Autocomplete widget. Available since jQuery UI 1.8, it’s easy to set up and provides a highly versatile set of functionality, including support for remote data sources, caching, scrollable results, categories, and more. In today’s tutorial, we’ll employ the jQuery UI Autocomplete widget to choose from a list of restaurants, fetched from the server at runtime.

The Setup

Any field that can receive input and have the contenteditable attribute can be converted into an Autocomplete, but and

HTML Goodies Logo

The original home of HTML tutorials. HTMLGoodies is a website dedicated to publishing tutorials that cover every aspect of being a web developer. We cover programming and web development tutorials on languages and technologies such as HTML, JavaScript, and CSS. In addition, our articles cover web frameworks like Angular and React.JS, as well as popular Content Management Systems (CMS) that include WordPress, Drupal, and Joomla. Website development platforms like Shopify, Squarespace, and Wix are also featured. Topics related to solid web design and Internet Marketing also find a home on HTMLGoodies, as we discuss UX/UI Design, Search Engine Optimization (SEO), and web dev best practices.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.