title: twitter bootstrap typeahead for multiple input in the same page
body: <p>I'm using <strong>twitter bootstrap typeahead</strong>  and I have these two java script functions to init the auto complete</p>
  
  <pre><code>  function autocomplete1(phr_type) { 
                  $('.typeahead').typeahead({                                
                     name: 'arabic',                                                             
                     remote: '/ajax/autocomplate?type='+1+'&amp;q=%QUERY',                                         
                     limit: 10 ,
                     valueKey : 'arabic_term',
  
                    });
  }
  
  function autocomplete2(phr_type) {
        $('.typeahead2').typeahead({                                
           name: 'arabic',                                                             
           remote: '/ajax/autocomplate?id=3&amp;q=%QUERY',                                         
           limit: 10 ,
           valueKey : 'arabic_term',
  
          });
  }
  </code></pre>
  
  <p>and I have two input</p>
  
  <pre><code>&lt;input type="text" class="typeahead2"/&gt;
  
  &lt;input type="text" class="typeahead"/&gt;
  </code></pre>
  
  <p>and I init the auto complete using </p>
  
  <pre><code>$(document).ready(function(){
      autocomplete1();
      autocomplete2();
  });
  </code></pre>
  
  <p>but all request take the parameter from first function the <strong>id</strong> parameter not send in the second input when I type inside the second input.</p>
  
  <p>the query parameter working well in the two function but Id not send, only the first parameter send. </p>
  
  <p>so all the request will be like :</p>
  
  <pre><code>GET http://host/ajax/autocomplate?type=1&amp;q=xy
  GET http://host/ajax/autocomplate?type=1&amp;q=zx
  </code></pre>
  
  <p>what i have to do solve that and send dynamic parameter.</p>
  
  <p>Thanks</p>