Ankur
Ankur

Reputation: 51100

What element do you need to create an autocomplete list

I want to create a highly customised autocomplete feature - hence none of the existing libraries suit my need.

I am wondering what element do you use to create the drop down part of an autocomplete feature, is it a floating div or something like that. Once I know that, the rest is easy.

Upvotes: 1

Views: 140

Answers (2)

gion_13
gion_13

Reputation: 41533

well, it must be a container that can be styled in a manner that suites your needs(mainly : position absolute/relative ,display:block and a fixed width).I mean that it can be a div or it can be an ul, but you cannot make it work with a span.
I would go with the ul to keep it simple, but if you need some advanced styling (such as a border with shadow), you may need to wrap that ul into one or more divs.The javascript doesn't rely on the type of element that you use.

Upvotes: 1

icktoofay
icktoofay

Reputation: 129001

A lot of different elements are possible. I'd suggest an absolutely positioned ul.

Upvotes: 0

Related Questions