jquery - Approaching Typeahead.js prefatched datums -
i'm using twitter typeahead.js this:
$('.autocomplete').typeahead({ name: 'autocomplete', prefetch: https://localhost/datums.json }); is there possibility how approach datums.json values anywhere else in script? creating condition asking if value exists in typeahead's datums.
if understand asking for, can use local instead of prefetch. use http client (xmlhttprequest, e.g.) read /datums.json yourself, , store reference in variable. pass variable local typeahead.
Comments
Post a Comment