Bootstrap Typeahead local, prefetch, or remote is required [closed]
Asked Answered
B

1

14

I try to get this example of twitters typeahead to run but i am getting the error in chromes console:

Uncaught Error: one of local, prefetch, or remote is required jquery-1.9.1.js:507

I am using typeayhead 0.9.1 (Nuget-Package). Is this a version problem? All examples set the source and not local/prefetch/remote in the request.

EDIT: Turned out that Twitter Bootstrap Typeahead and Twitter Typeahead are two different libraries.

Benedetto answered 18/4, 2013 at 17:50 Comment(0)
K
11

This only means you need to give a list in which Typeahead will search for completion value.

You must really pass at least one data source (prefetch or remote) or a data set (local).

https://github.com/twitter/typeahead.js#jquerytypeaheaddatasets


Also, should be noted that Twitter typeahead and Twitter Bootstrap typeahead ain't the same plugin. They have different API. The article you read speak about Twitter Bootstrap typeahead: http://twitter.github.io/bootstrap/javascript.html#typeahead but you used it as Twitter typeahead!

Keelykeen answered 18/4, 2013 at 18:9 Comment(3)
no? look at the example. Nearly in all examples i find the source attribute is set and not local/prefetch/remoteBenedetto
Oh, I see what the problem is. Twitter Typeahead and Twitter Bootstrap typeahead ain't the same plugin. They have different API. The article you read speak about twitter bootstrap typeahead: twitter.github.io/bootstrap/javascript.html#typeaheadKeelykeen
yes i did also think that these are the same projects...Benedetto

© 2022 - 2024 — McMap. All rights reserved.