<input type="text" class="form-control2 ui-autocomplete-input departure" name="departure" style="text-align:center" id="departure1" maxlength="4" autocomplete="off">
<input type="text" class="form-control2 ui-autocomplete-input departure" name="departure" style="text-align: center; border-color: rgb(224, 224, 224);" id="departure12" maxlength="4" autocomplete="off">
$(".departure").each(function(){
$(this).autocomplete({
minLength : 3,
source : function(request, response) {
$.ajax({
url : "/FDTL/SearchController",
type : "POST",
data : {
term : request.term
},
dataType : "json",
success : function(data) {
response(data.slice(0, 10));
}
});
}
});
});