My HTML structure is like this :
<div class="controls">
<input id="car" class="span3" type="text" placeholder="B.E" autocomplete="off" value="" name="car[]">
</div>
<div class="controls">
<input id="car" class="span3" type="text" placeholder="B.E" autocomplete="off" value="" name="car[]">
</div>
My javascript is given below:
car = getcar();
$("#car").click(function() {
$('#car').typeahead({
source: car,
items: 10
});
});
getcar()
is function which is getting source data using ajax
It is showing typeahead for only first input
element not for second input
element
What should i do now?