Skip to content

Instantly share code, notes, and snippets.

@jharding
Last active May 18, 2018 05:11
Show Gist options
  • Save jharding/9458816 to your computer and use it in GitHub Desktop.
Save jharding/9458816 to your computer and use it in GitHub Desktop.
#scrollable-dropdown-menu .tt-dropdown-menu {
max-height: 150px;
overflow-y: auto;
}
<div id="scrollable-dropdown-menu">
<input class="typeahead" type="text" placeholder="Countries">
</div>
$('#scrollable-dropdown-menu .typeahead').typeahead(null, {
name: 'countries',
limit: 10,
source: countries
});
@jalan
Copy link

jalan commented May 14, 2015

I think .tt-dropdown-menu needs changed to .tt-menu in this example, for 0.11.0

@ahmadi1089
Copy link

ss

@yahya-uddin
Copy link

+1 on change to .tt-menu

@zenithtekla
Copy link

.tt-dropdown-menu is correct.
Check out, my working mockup example here http://jsfiddle.net/w03a28h9/40

@devmi
Copy link

devmi commented Jun 22, 2016

It's a matter of version – the sample documentation is outdated.

As of today, the Scrollable Dropdown Menu example says #scrollable-dropdown-menu .tt-dropdown-menu (typeahead.js 0.10.4). Its code uses #scrollable-dropdown-menu .tt-menu (typeahead.js 0.11.1)

@antoni-g
Copy link

Just a heads up that this example is broken.

Uncaught TypeError: this.source is not a function typeahead.js:792

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