Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $('#searchIconInput').typeahead({
- hint: true,
- highlight: true,
- minLength: 3
- },
- {
- name: 'searchSuggestionsShown',
- source: searchSuggestionEngine
- });
- });
- var searchSuggestionEngine = new Bloodhound({
- datumTokenizer: Bloodhound.tokenizers.whitespace,
- queryTokenizer: Bloodhound.tokenizers.whitespace,
- prefetch: {
- url: '@Url.Action("RetrieveSuggestedSearchItems", "Search")',
- ttl: getNumberOfMillisecondsToCachePrefetchedData(),
- },
- remote: {
- url: '@Url.Action("RetrieveAdditionalSuggestedSearchItems", "Search")/?query=',
- replace: function (url, uriEncodedQuery) {
- return url + uriEncodedQuery;
- },
- cache: false
- }
- });
Add Comment
Please, Sign In to add comment