Created
February 11, 2015 01:03
-
-
Save brightrain/23f4f68a0f3ed79c6fc8 to your computer and use it in GitHub Desktop.
typeahead setup all
This file contains 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 characters
$("#searchInput").typeahead({ | |
// how many characters does the user type before suggestions start firing | |
minLength: 3, | |
highlight: true, | |
hint: false | |
}, { | |
name: "camp", | |
displayKey: "name", | |
source: campBH.ttAdapter(), | |
// what the header looks like for this source in the suggestions drop down | |
templates: { | |
header: "<h1 class='typeahead-header'><span class='icon icon-camp'></span> Campgrounds</h1>" | |
} | |
}, { | |
name: "trail", | |
displayKey: "name", | |
source: trailBH.ttAdapter(), | |
templates: { | |
header: "<h1 class='typeahead-header'><span class='icon icon-trail'></span> Trail Heads</h1>" | |
} | |
}, { | |
name: "ski", | |
displayKey: "name", | |
source: skiBH.ttAdapter(), | |
templates: { | |
header: "<h1 class='typeahead-header'><span class='icon icon-ski'></span> Ski Areas</h1>" | |
} | |
}, { | |
name: "esri-geocoder", | |
displayKey: "name", | |
source: esriBH.ttAdapter(), | |
templates: { | |
header: "<h1 class='typeahead-header'><span class='icon icon-map-marker'></span> Addresses and Places</h1>" | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment