In my JQuery to display an autocomplete list, I have the following to close the list when clicked outside:
$(document).bind('click', function (event) {
// Check if we have not clicked on the search box
if (!($(event.target).parents().andSelf().is('#showmore'))) {
$(".ui-menu-item").display = 'none';
$(".ui-menu-item").remove();
}
});
The list closes but not completely! The following image shows a small white area beneath the text box.
The html on the page shows the following:
<ul class="ui-autocomplete ui-front ui-menu ui-widget ui-widget-content ui-corner-all" id="ui-id-1" tabindex="0" style="display: block; top: 423.5625px; left: 272.875px; width: 361px;"></ul>
Though I have closed the autocomplete and set its display to none, its still there! PLease help me resolve this.