Twitter Typehead.js atuocomplete is a feature which is used to complete search keywords in search bar. It can be integrated with on site search, used  to provide suggestion related to a search term. It is very important for on site search because of the following reasons.

1: To reduce the spelling mistakes

Autocompeletion is very helpfull to reduce the spelling mistakes of the visitors or users of your website. It improves the correctness of the on site searching and its features.

2: Promtion of your products

It is also very helpfull to promote your products. By using autocompeletion searching technique you can display your premium things on the top of sarching list. It attract the attention of the users towards the fatured products.

3: Increase the typing speed of physically disable

Autocomeplete technique is also very helpfull to increase the typing speed of physically disbaled peoples. They can type one letter and see a lots of suggession and choose among them.

What is Twitter Typehead.js ??

Twitter typehead.js is a fast and flexible javascript library that is easy to customize and provide reliable autocompelete functionality. it is a consist collection of two components.

1: Bloodhound
Bloodhound is suggession engine that is responsible for computing suggessions for a given query.

2: Typehead
Typehead is a UI View which is responsible for providing suggestions and handling DOM interactions.

How to install typehead ??

there are few common methods for the installation of typehead as mentioned below.

1: Preffered method

install with bower, type the following command in your command prompt or terminal

2: Other Methods

How to use typehead.js ??

1: include following scripts because it has dependency of jquery and after the jquery also include the source file of typehead.bundle.js.

<script src=”https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js”></script>
<script type=”text/javascript” src=”typeahead.bundle.js”></script>

2: Initialize the typehead.js script

3: Include the following styesheet with in <head></head> tag

 

4:  Add an input boxwith typehead tt-query class  as given below

Now you can able to use typehead autocompelete feature

schedule task with Cron Job

Guys if you have any question about the Twitter Typehead.js autocompelete suggession, you can leave it on comment and i will answer you.

thanks