typeahead.js - Pass value from DOM element into typeahead with bloodhound -
i pass value hidden input field search remote url parameter in bloodhound. the variable dynamic , updated every time modal popup gets open. initial value null , believe that's why not working @ all: url: url + 'equipment/getsuggestions/' + $('#equipment-type-input').val() + '/%query', as can see i'm getting jquery value empty. because getting once when plugin initialized? here full script: // instantiate 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 remote source json array javascript object array return $.map(movies, function (movi