Below is the function which is called to show the autocomplete in a search box...I want the auto complete to disappear onBlur or click outside the search box...please tell m
This is a bit simpler:
$('body').click( function() {
$('.ui-autocomplete').hide('');
});
You could try binding the click event to the document. Something like this:
$(document).bind('click', function (event) {
// Check if we have not clicked on the search box
if (!($(event.target).parents().andSelf().is('.searcher'))) {
// Hide/collapse your search box, autocomplete or whatever you need to do
}
});