title: How Autocomplete same input with the same class but only autocomplete one input at a time
body: <p>I been trying to find a way of how autocomplete one input at a time ,
  But the struggle is that the input are created from a select * from a table on a db. .
  And when  typing in one input and selecting the result  the other input changes as well.</p>
  <p>php</p>
  <pre><code> while ($row = $resultado-&gt;fetch_assoc()) {
                           echo &quot;&lt;tr&gt;
                             &lt;td&gt;&lt;input type='text' name='name[]' class='name' 
                             value='&quot;.$fila[&quot;name&quot;].&quot;'/&gt; 
                             &lt;/td&gt;
                         }
  </code></pre>
  <p>js</p>
  <pre><code>&lt;script type='text/javascript'&gt;
       $(function() {
              $('.name').autocomplete({
                  source: '../ajax/pro.php',
                  minLength: 1,
                  select: function(event, ui) {
                      event.preventDefault();
                      $('.name').val(ui.item.name);
                      $('#name').val(ui.item.name);
                    
                     
                   }
              });
          });
  
  
     &lt;/script&gt;
  </code></pre>