title: Bootstrap 3 typeahead.js - remote url attributes
body: <p>I'm trying to call my remote url with added attributes to the url.</p>
  
  <p>For now I have this working:</p>
  
  <pre><code>$('#league').typeahead({
          remote: '/typeahead/get_league?query=%QUERY',
          limit: 10
  });
  </code></pre>
  
  <p>Now I would like to do something like this:</p>
  
  <pre><code>$('#league').typeahead({
          remote: function () {
              var q = '/typeahead/get_league?query=%QUERY';
              if ($('#sport').val())
                  q += "&amp;sport=" + encodeURIComponent($('#sport').val());
              return base_url + q;
          },
          limit: 10
  });
  </code></pre>
  
  <p>I would like to add the GET attribute 'sport' to the URL so I can narrow down my query on the backend. I tried the code above but I get a JS error. </p>
  
  <p>The previous version of Bootstrap Typeahead allowed this type of setup. It was very useful as I could update the remote URL every time a key get hit.</p>
  
  <p>Any idea how to make that work for this version ?</p>