типа такого?
<html>
<head>
<title>example</title>
</head>
<body>
<div></div>
<input type="button" value="добавить">
<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://code.jquery.com/ui/1.11.0/jquery-ui.js"></script>
<script>
function Inputs (container)
{
this.number = 0;
this.prefix = 'my-input-';
this.container = container;
this.autocomplete = function (number)
{
$("#" + this.prefix + number).autocomplete(
{
source: "/regions-for-admin",
minLength: 3,
select: function (event, ui)
{
console.log(ui.item ? ui.item.id : "Not " + this.value);
}
});
}
this.addInput = function ()
{
++this.number;
$(this.container).append('<input type="text" id="' + (this.prefix + this.number) + '">');
this.autocomplete(this.number);
}
}
var inputs = new Inputs($('div'));
$('input[type=button]').click(function ()
{
inputs.addInput();
});
</script>
</body>
</html>