I\'m using Autocomplete from jquery-ui. In the multiple values, you can get dropdown list for each word after space, but the dropdown appears at the size of the input box. Is it
I've based the answer on the answer to this question. As mentioned in that answer, IE<9 will need some extra code to make this work.
Basically you create a span into which you write out the contents of the input element. You then use the width of this span to calculate the offset. JqueryUI provides a position hook where you can actually offset the value. so the HTML
And the JS
var query= $("#query");
var faux = $("#faux");
query.autocomplete({
source: mySource
}).on("keydown", function() {
var off = query.selectionStart;
faux.text(query.val().substring(0, off).replace(/\s/g, "\u00a0"));
query.autocomplete("option", "position",
{my: "left top", at: "left+" + faux.outerWidth() + " bottom"});
});
Working JSFiddle