Skip to content

Instantly share code, notes, and snippets.

@adrianhove
adrianhove / remote-typeahead.js
Created April 4, 2012 02:24 — forked from geuis/remote-typeahead.js
Remote data querying for Twitter Bootstrap 2.0 Typeahead without modifications, this fork adds the functionality of getting the clicked item's value
<script>
// Charles Lawrence - Feb 16, 2012. Free to use and modify. Please attribute back to @geuis if you find this useful
// Twitter Bootstrap Typeahead doesn't support remote data querying. This is an expected feature in the future. In the meantime, others have submitted patches to the core bootstrap component that allow it.
// The following will allow remote autocompletes *without* modifying any officially released core code.
// If others find ways to improve this, please share.
//User clicked some value by Adrian Hove
var autocomplete = $('#searchinput').typeahead()
.on('keyup', function(ev){
//User clicked some value