title: Prevent typeahead dataset from closing on click
body: <p>I'm using the <a href="https://github.com/twitter/typeahead.js" rel="nofollow">Typeahead</a> library with a custom template in the results.  The results contain a clickable link that should expand an element within the results.  I am using <code>jQuery.on</code> to attach the click event handler to this element. When I click the element, the typeahead selected event is fired and the dataset box closes. I've tried adding <code>e.stopPropagation()</code> to the click event, but it doesn't appear to work.</p>
  
  <p>The goal is to keep the typeahead tt-dataset search results box open when this link is clicked.  Should I be doing this differently?</p>
  
  <p>EDIT: I'm using bloodhound as the typeahead source</p>
  
  <pre><code>$(document).on('click', '.mylink', function(e) {
  
      if ($(e.target).is('.mylink')) {
          //don't close the search results.  this isn't working
          e.stopPropagation();
          //show div
      }   
  
  });
  </code></pre>
  
  <p>html template for the tt-dataset (I want the <code>mylink</code> anchor to keep the typeahead box open):</p>
  
  <pre><code>&lt;script id="search-template" type="text/x-handlebars-template"&gt;    
      &lt;div&gt;
          &lt;strong&gt;{{value}}&lt;/strong&gt;
          &lt;span&gt;&lt;a href="javascript:;;" class="mylink"&gt;show&lt;/a&gt;&lt;/span&gt;
          &lt;div style="display:none"&gt;show this&lt;/div&gt;
      &lt;/div&gt;
  &lt;/script&gt;
  </code></pre>