オートコンプリート機能にブートストラップの先行入力を使用しています。ユーザーが最初の文字を入力するのを待つのではなく、入力がアクティブになったときに(マウスクリックまたは入力へのタブで)結果を返すために先行入力が必要です。タイプダウンのようなものです。
<input id="input01" class="input-medium" type="text" data-provide="typeahead" placeholder="TypeAhead…" autocomplete="off">
$(document).ready(function($) {
// Workaround for bug in mouse item selection
$.fn.typeahead.Constructor.prototype.blur = function() {
var that = this;
setTimeout(function () { that.hide(); }, 250);
};
$('#input01').typeahead({
source: function(query, process) {
return ["hello","world", "awesome"];
}
});
});