title: jQuery-UI AutoComplete not working for dynamic fields
body: <p>AutoComplete works correctly for the static field, but it doesn't work for dynamic fields.</p>
  
  <p>I've tried <code>.live()</code> method for I could not get it to work correctly.</p>
  
  <p>Here is my HTML:</p>
  
  <pre><code>&lt;table&gt;
      &lt;tr class="selectmatprimas"&gt;
          &lt;td&gt;
              &lt;input type="text" class="selectmatprima" /&gt;
              &lt;input type="text" name="matprimas[]" /&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr class="clone" style="display:none;"&gt;
          &lt;td&gt;
              &lt;input type="text" class="selectmatprima" /&gt;
              &lt;input type="text" name="matprimas[]" /&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  &lt;input type="button" value="addmore" id="addmore" /&gt;
  </code></pre>
  
  <p>​
  Here is my JS:</p>
  
  <pre><code>var src = [
      {
          "label": "Mat\u00e9ria Prima 1",
          "value": "1"
      },
      {
          "label": "Mat\u00e9ria Prima 2",
          "value": "2"
      }
  ];
  
  $("input.selectmatprima").autocomplete({
      source: src,
      select: function (event, ui) {
          event.preventDefault();
          this.value = ui.item.label;
          $(this).next().val(ui.item.value);
      },
      focus: function (event, ui) {
          event.preventDefault();
          this.value = ui.item.label;
          $(this).next().val(ui.item.value);
      }
  });
  
  $("input#addmore").click(function(){
      var a = $('tr.clone').html();
      var b = $('tr.selectmatprimas:last');
      b.after("&lt;tr class='selectmatprimas'&gt;"+a+"&lt;/tr&gt;");
  });
  </code></pre>
  
  <p><a href="http://jsfiddle.net/pK78z/" rel="nofollow">Online DEMO</a></p>
  
  <p>As you can see, when I click the addmore button, the autocomplete doesn't work on the new fields...</p>