Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
typeahead setup all
$("#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>&nbsp;Campgrounds</h1>"
}
}, {
name: "trail",
displayKey: "name",
source: trailBH.ttAdapter(),
templates: {
header: "<h1 class='typeahead-header'><span class='icon icon-trail'></span>&nbsp;Trail Heads</h1>"
}
}, {
name: "ski",
displayKey: "name",
source: skiBH.ttAdapter(),
templates: {
header: "<h1 class='typeahead-header'><span class='icon icon-ski'></span>&nbsp;Ski Areas</h1>"
}
}, {
name: "esri-geocoder",
displayKey: "name",
source: esriBH.ttAdapter(),
templates: {
header: "<h1 class='typeahead-header'><span class='icon icon-map-marker'></span>&nbsp;Addresses and Places</h1>"
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment