This article introduces a jQuery plug-in for Automatic completion of text effects. This plug-in can be used with local data for some operations. We recommend that you take a look at several H5 data storage methods (localstorage and sessionstorage, IndexedDB, offline cache manifest files)
The effect can be achieved using the jQuery plug-in Typeahead. js. This jQuery plug-in comes from a new Twitter project and supports remote and local datasets. The difference is that you can use local storage to store datasets locally, effectively improving the user experience. At the same time, it also has many options for processing remote datasets, such as (request frequency, maximum number of concurrent requests, and so on ).
Main features
Supports local data storage, client loading, and optimized loading speed
Supports multiple languages and Arabic
Support for Hogan. js template engine integration
Support multi-dataset assembly
Supports local and remote datasets
Project address
Http://twitter.github.io/typeahead.js
How to Use
First, introduce the js and CSS files related to the jQuery framework and Typeahead. JS plug-in to the webpage head.
The Code is as follows: