I have a search box on a page that's hooked up to an AJAX script that returns HTML based on the contents of the search box, via GET.
In order to display the results directly below the search box, I need to create a div in a position relative to that box (the box's position is variable depending on screen resolutions). How can I use jQuery to achieve this?
Alternatively, can jQuery UI Autocomplete be used instead and if so, how? I did have a bash with it but had trouble getting it to display the HTML at all.
Edit: Here is a jsfiddle link: http://jsfiddle.net/UxPb8/
You can be forgiven for thinking it works but as soon as there's more stuff on the page to the left of the search box, the positioning is thrown off, hence this question.