Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Autocomplete Without jQuery UI

Tags:

I'm using jQuery in my project and I need to implement autocomplete, but I'd like to avoid including jQuery UI widget, and hopefully use some specific external plugin. Could you please provide some examples/link? I have to query a remote JSON source that returns key-value couples.

like image 514
Jumpa Avatar asked Oct 03 '13 10:10

Jumpa


People also ask

What is jQuery ui autocomplete?

Autocomplete mechanism is frequently used in modern websites to provide the users a list of suggestion while typing the beginning word in the text box. It facilitates the user to select an item from the list, which will be displayed in the input field.

What is UI autocomplete?

ui-autocomplete : The menu used to display matches to the user. ui-autocomplete-input : The input element that the autocomplete widget was instantiated with.

How can create autocomplete search box in jQuery?

Syntax: $("TagId"). autocomplete({ source : itemList // List of Words. })


1 Answers

You can use HTML5 'list' attribute in your input textbox and provide it a custom list of values by using datalist.

<!DOCTYPE html> <html> <head> <!--your stuff--> </head> <body> <!--your stuff--> <input type="text" id="txtAutoComplete" list="languageList"/><!--your input textbox--> <datalist id="languageList"> <option value="HTML" /> <option value="CSS" /> <option value="JavaScript" /> <option value="SQL" /> <option value="PHP" /> <option value="jQuery" /> <option value="Bootstrap" /> <option value="Angular" /> <option value="ASP.NET" /> <option value="XML" /> </datalist> </body> </html> 

If you didn't get it, Read more at http://www.cheezycode.com/2015/09/create-auto-complete-dropdown-using.html

There's a video as well for it Auto-Complete Without JQuery

like image 156
Cheezy Code Avatar answered Sep 18 '22 12:09

Cheezy Code