javascript - Pass a parameter into Bloodhound from Typeahead? -
i setting form typeahead. have 2 input fields next each other, , need autocomplete on each of them. html looks this: <select id="numerator"> <option value="presentation">presentation</option> <option value="chemical">chemical</option> </select> <input id="numeratorid" class="typeahead" type="text" /> <br/> <select id="denominator"> <option value="presentation">presentation</option> <option value="chemical">chemical</option> </select> <input id="denominatorid" class="typeahead" type="text" /> each of input fields autocomplete looking @ api endpoint. should of form /api/1.0/code?type=presentation&code=123 or /api/1.0/code?type=chemical&code=123 . the value of type parameter in api call should depend on value of <select> element next each ...