-
-
Save jesperronn/fc05bc6dbcd7f4badbe2 to your computer and use it in GitHub Desktop.
Revisions
-
jesperronn revised this gist
Oct 15, 2015 . 1 changed file with 1 addition and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,7 @@ var bestPictures = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'), queryTokenizer: Bloodhound.tokenizers.whitespace, prefetch: '../data/films/post_1960.json' }); $('#remote .typeahead').typeahead(null, { -
jharding revised this gist
Apr 25, 2015 . 1 changed file with 6 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,13 +2,14 @@ var bestPictures = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'), queryTokenizer: Bloodhound.tokenizers.whitespace, prefetch: '../data/films/post_1960.json', remote: { url: '../data/films/queries/%QUERY.json', wildcard: '%QUERY' } }); $('#remote .typeahead').typeahead(null, { name: 'best-pictures', display: 'value', source: bestPictures }); -
jharding created this gist
Mar 10, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ <div id="remote"> <input class="typeahead" type="text" placeholder="Oscar winners for Best Picture"> </div> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ var bestPictures = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'), queryTokenizer: Bloodhound.tokenizers.whitespace, prefetch: '../data/films/post_1960.json', remote: '../data/films/queries/%QUERY.json' }); bestPictures.initialize(); $('#remote .typeahead').typeahead(null, { name: 'best-pictures', displayKey: 'value', source: bestPictures.ttAdapter() });