Skip to content

Instantly share code, notes, and snippets.

@Kaapiii
Last active December 16, 2015 16:49
Show Gist options
  • Save Kaapiii/5465687 to your computer and use it in GitHub Desktop.
Save Kaapiii/5465687 to your computer and use it in GitHub Desktop.
Typeahead.js how to use filters
$("#search").typeahead({
remote: 'url',
limit: 10,
prefetch: {
url:hotelPrefetchURL,
filter:function(respData){
var data = respData.data;
return data;
},
ttl: 86400000
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment