Creating an autocomplete search feature

This recipe will show you how to suggest search terms to a user as they are typing into a search input. This is a very popular feature and can be very helpful to the user as it provides them with some insight into what search results will be available before they have even made the search. jQuery UI provides the autocomplete functionality that can be quickly added to any input element.

Getting ready

Create recipe-5.html, recipe-5.js, and recipe-5.css in the chapter9 folder, where you have saved the other recipe files.

This recipe utilizes a quality API provided by Trakt.tv (http://trakt.tv/api-docs/). You will need to register (for free) and obtain an API key before you can begin this recipe. Once you have ...

Get jQuery 2.0 Development Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.