title: Cannot make links clickable in jQuery autocomplete
body: <p>I am overriding jQuery Autocomplete to display simple links (<code>&lt;a href=...&gt;</code>") and some extra formatting that will need to become more complex later. </p>
  
  <p>Nothing happens when the links are clicked. Is there a way to remove whatever event handler or other code is intercepting clicks so that they behave as expected?</p>
  
  <p>There are several related questions (eg <a href="https://stackoverflow.com/questions/4536055/jquery-autocomplete-where-the-results-are-links">#4536055</a>) with good answers, but they deal with the default Autocomplete behavior. The <code>source</code> answer seems like a hack -- links should function like links.</p>
  
  <p>My code:</p>
  
  <pre><code>$.widget( "custom.complete_custom", $.ui.autocomplete, {
          _renderMenu: function( ul, items ) {
              // Trigger a "See all" link if there are two many results
              var self = this;
              var too_long = false;
              if (items.length &gt; 10){
                  original_length = items.length;
                  too_long = true;
                  items = items.slice(0,10);
              }
  
              // Display each result as a link
              $.each( items, function( index, item ) {
                  ul.append( "&lt;li class='ui-autocomplete-category'&gt;&lt;a href='/building/" + item.buildingcode + "'&gt;" + item.buildingname + "&lt;/a&gt;&lt;/li&gt;" );
              });
  
              // Add the "See all" link if necessary
              if(too_long) {
                  ul.append( "&lt;li class='ui-autocomplete-category see-all'&gt;&lt;a href='/search/" + 'term' + "'&gt;&lt;strong&gt;See all " + original_length + " results&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;" )
              } 
          }
      });
  
  
      // The autocomplete activator
      $( "#search" ).complete_custom({
      source: "/search/json",
          minLength: 2
      });
  </code></pre>