title: jQuery .focusout / .click conflict
body: <p>I'm working on a project with an autocomplete searchbox. Now I have the issue that I want to pass the value from the found autocompleteresults to the input box, but on the same time, I want the autocompletebox to hide when the inputfield is not more focused. </p>
  
  <p>Now I have a conflict going on with both of them since the click on the autocompletebox is seen as focusout and hide the box even before it can pass the value. Any pointers or workarounds for this kind of issue? Here a jsfiddle to make it more clear to you.</p>
  
  <p><a href="http://jsfiddle.net/KeGvM/" rel="noreferrer">http://jsfiddle.net/KeGvM/</a></p>
  
  <p>Or here </p>
  
  <p><strong>CSS</strong>:</p>
  
  <pre><code>#a_c {display:none;}​
  </code></pre>
  
  <p><strong>JS</strong>:</p>
  
  <pre><code>$('#search_field').focusout(function() {
      $('#a_c').hide(); // IF I DELETE THIS IT WORKS
  });
  
  $('#search_field').focusin(function() {
      $('#a_c').show();
  });
  
  $('#a_c a').click(function() {
      $('#search_field').val('');
      var value = $(this).text();
      var input = $('#search_field');
      input.val(input.val() + value);
      $('#a_c').hide();
      return false;
  });​
  </code></pre>
  
  <p><strong>HTML</strong>:</p>
  
  <pre><code>&lt;input autocomplete="off" onkeyup="searchFor(this.value);" name="search" id="search_field" class="bold" type="text" placeholder="Search..."&gt;
  &lt;div id="a_c"&gt;&lt;a href=""&gt;hello world&lt;/a&gt;&lt;/div&gt;​
  </code></pre>