Skip to content

Instantly share code, notes, and snippets.

@jharding
Last active December 13, 2015 22:19
Show Gist options
  • Save jharding/4983546 to your computer and use it in GitHub Desktop.
Save jharding/4983546 to your computer and use it in GitHub Desktop.
$('.example-sports .typeahead').typeahead([
{
name: 'nba-teams',
prefetch: '../data/nba.json',
header: '<h3 class="league-name">NBA Teams</h3>'
},
{
name: 'nhl-teams',
prefetch: '../data/nhl.json',
header: '<h3 class="league-name">NHL Teams</h3>'
}
]);
@kaichanvong
Copy link

@jbm482 - See the example here, the json sits relative to that link.

@psankar
Copy link

psankar commented Jan 30, 2014

One question. Is there a way to show the two different datasets in two different panes ? For example: I want the NBA results to be shown in a bottom pane which I can navigate via down arrow key and the NHL teams to be shown in a top pane (above the textbox) which can be navigated via the up arrow key. Is it possible to do such a navigation ? I will explore patching it myself but I am at best a javascript novice and so would like to ask before attempting to fix it myself. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment