I'm trying to use Twitter Typeahead with Bootstrap 3 RC1, because Bootstrap dropped its own typeahead plugin on version 3.
I'm using the following HTML on my form:
<div class="well">
<form>
<fieldset>
<div class="form-group">
<label for="query">Search:</label>
<input type="text" class="form-control" name="query" id="query" placeholder="Start typing something to search...">
</div>
<button type="submit" class="btn btn-primary">Search</button>
</fieldset>
</form>
</div>
Without adding Typeahead, the search input field displays like this:
Then I added Typeahead like this:
<script>
$('#query').typeahead({
local: ['alpha', 'bravo','charlie','delta','epsilon','gamma','zulu']
});
</script>
And the field became smaller, with a white rectangle inside it.
Am I doing something wrong or it's just a bug on Typeahead or Bootstrap 3 RC1?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…