L
L
lopatin_ay2015-09-27 16:47:18
css
lopatin_ay, 2015-09-27 16:47:18

How to implement a drop-down list for input text (analogous to Google)?

Hello, tell me, please, how to make a drop-down list of search results like Google's? Search results come to me via ajax and at the moment I display them as list items (ul + li), but then I remembered that Google has a very convenient way to select these results. That is, we write something in the search bar, we receive options (in the form of a list) and by pressing the down / up arrow we can choose what we need.
Surely someone has already done this, but I can not find the right one. There is a close solution on select2 but it's not much.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly Inchin ☢, 2015-09-27
@In4in

In addition to the above - in HTML5 there is a datalist tag , the options of which can be generated by JS when typing.

D
Dmitry Skogorev, 2015-09-28
@EnterSandman

jquery suggestions / jquery autocomplete

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question