Test Case Boilerplate

Fork this way...

HTML

<script src="http://code.jquery.com/ui/jquery-ui-git.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/jquery-ui-git.css">
<div id="box">
    <div>
        <input type="text"/>
    </div>
</div>

<div id="target"></div>

JavaScript

var box = $('#box').detach();
var input = box.find('input');

input.autocomplete({
    source: ['hello', 'world'],
    appendTo: input.parent()
});

box.appendTo('#target');