title: Pass value from DOM element into typeahead with bloodhound
body: <p>I would like to pass a value from a hidden input field to the search remote URL parameter in bloodhound. </p>
  
  <p>The variable is dynamic and will get updated every time a modal popup gets open. Its initial value is null and I believe that's why this is not working at all:</p>
  
  <pre><code>url: url + 'equipment/getSuggestions/' + $('#equipment-type-input').val() + '/%QUERY',
  </code></pre>
  
  <p>As you can see I'm getting it with jQuery but the value is empty. Probably because it is only getting it once when the plugin is initialized? </p>
  
  <p>Here the full script:</p>
  
  <pre><code>// Instantiate the Bloodhound suggestion engine
  var suggestions = new Bloodhound({
      datumTokenizer: function (datum) {
          return Bloodhound.tokenizers.whitespace(datum.value);
      },
      queryTokenizer: Bloodhound.tokenizers.whitespace,
      remote: {
          url: url + 'equipment/getSuggestions/' + $('#equipment-type-input').val() + '/%QUERY',
          wildcard: '%QUERY',
          filter: function (movies) {
              // Map the remote source JSON array to a JavaScript object array
              return $.map(movies, function (movie) {
                  return {
                      value: movie
                  };
              });
          }
      }
  });
  
  // Initialize the Bloodhound suggestion engine
  suggestions.initialize();
  
  // Instantiate the Typeahead UI
  $('#equipment-id-input').typeahead(null, {
      displayKey: 'value',
      source: suggestions.ttAdapter()
  });
  </code></pre>