I have a div which is shown when a AJAX callback is executed, but I can't get it to hide again. I'm using some of the code from the autocompleter and the div contains a <ul>. The code I have is at http://pastebin.com/m4b7bf13c . I've left out everything but the relevant parts. I thought I understood how the autocompleter hides the menu when the user clicks elsewhere in the window but I can't get it working.
Is there something I've missed out?