Dimdum
Dimdum

Reputation: 332

<input type="search"> and jQuery Autocomplete

Once i change the type of the <input> element to the html5 type search, jQuery's Autocomplete functionality just won't work anymore.

I use jQuery Mobile, and i am trying to use the "search" input type with jQuery UI Autocomplete

Upvotes: 1

Views: 1902

Answers (2)

user2010805
user2010805

Reputation: 1

Using:

<input type="text" data-type="search" />

will give the same visual results as

<input type="search" />

But the autoComplete plugin will still work, also broken with type="search", https://github.com/commadelimited/autoComplete.js

Might also fix jQuery UI Autocomplete?

Upvotes: 0

gdoron
gdoron

Reputation: 150253

It's because the jQuery UI Autocomplete select only elements with type="text"

Have you tried to attach the Autocomplete to the elements with id selector?

Upvotes: 1

Related Questions