I am still quite a novice with jQuery, but I was able to configure the jQuery UI and implement the autocomplete functionality on my search box. However, I have been having some issues. Occasionally, the autocomplete will break, causing the search box itself to disappear. Firebug is telling me that the action is being aborted and there is no response received.
There is no obvious pattern to these errors, and the same term will work the next time I try it, so I doubt it is a data issue. The main issue is that this causes the search box to completely disappear from the page until a page refresh. Is there any way to stop this happening at least? I am happy to provide any more information if requested.
$(document).ready(function($){
$('.search').each(function(){
var self = $(this);
self.autocomplete({source: "/products/autocomplete"});
});
});