KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
There are two elements in play: $('#myInput') // an input field for search $('#myList') // a list to display search results I want to hide the list when the input no longer has focus, like so: $('#myInput').blur(function() { $('#myList').hide(); }); This works great, except when a list item is clicked, because the blur event fires and hides the list before the click is registered. The goal is for the list to stay visible when any part of the list is clicked, even though this will cause the input to blur. How can I do this? Thanks!
Tags (comma-separated)
Save Edits
Cancel