title: cannot bind values to dynamically created textbox jquery
body: <p>i'm trying to bind jquery autocomplete result to dynamically created textboxes, i have searched internet and forums but couldn't found any appropriate solution, i'm sharing my code</p>
  
  <p>JQUERY:</p>
  
  <pre><code>function bindAutoComplete(classname) {
      $("." + classname).autocomplete({
          source: function (request, response) {
              $.ajax({
                  url: '/Admin/Ticket/GetPart',
                  type: "GET",
                  dataType: "json",
                  data: { term: request.term },
                  success: function (data) {
                      if (data != null) {
                          if (data.length &gt; 0) {
                              response($.map(data, function (item) {
                                  return { label: item.PartNumber, value: item.PartNumber };
                              }))
                          }
                          else {
                              response([{ label: 'No results found.' }]);
                          }
                      }
                  }
              })
          },
      });
  
  }
  
  function bindData() {
      var errormsg = "";
      var amount = $('.inputs').val();
  
      $.ajax({
          type: "GET",
          url: '/Admin/Ticket/GetPart',
          data: { 'term': amount },
          dataType: "json",
          success: function (data) {
              if (data != null) {
                  if (data.length &gt; 0) {
                      $('#Manufacturer').val(data[1].Manufacturer);
                      $('#DateCode').val(data[0].DateCode);
                      $('#Package').val(data[0].PackageCase);
                      $('.buyingprice').val(data[0].Price);
                  }
                  else {
                      $('#Manufacturer').val('');
                      $('#DateCode').val('');
                      $('#Package').val('');
                      $('.buyingprice').val('');
                  }
              }
  
          },
          error: function (jqXHR, exception) {
              $('#error').html(jqXHR)
          }
      });
  };
  
  // fetch part number
  $(document).ready(function () {
      bindAutoComplete('inputs');
      $('.inputs').keyup(bindData)
  });
  
  $("#AddMore").click(function () {
  
      $("#maintable").each(function () {
  
          var tds = '&lt;tr&gt;';
  
          jQuery.each($('tr:last td', this), function () {
              tds += '&lt;td&gt;' + $(this).html() + '&lt;/td&gt;';
          });
          tds += '&lt;/tr&gt;';
  
          if ($('tbody', this).length &gt; 0) {
  
              $('tbody', this).append(tds);
           //   bindData();
              bindAutoComplete('inputs');
              $("#delete").fadeIn('200');
          }
          else {
              $(this).append(tds);
              bindAutoComplete('inputs');
          //    bindData();
  
          }
      });
  
  });
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;table id="maintable"&gt;
          &lt;thead&gt;
              &lt;tr&gt;
                  &lt;th&gt;
                      Part No
                  &lt;/th&gt;
                  &lt;th&gt;
                      MFG
                  &lt;/th&gt;
                  &lt;th&gt;
                      DC
                  &lt;/th&gt;
                  &lt;th&gt;
                      PKG
                  &lt;/th&gt;
                  &lt;th&gt;
                      QTY. Need
                  &lt;/th&gt;
                  &lt;th&gt;
                      QTY. Offer
                  &lt;/th&gt;
                  &lt;th&gt;
                      BP
                  &lt;/th&gt;
                  &lt;th&gt;
                      BP(USD)
                  &lt;/th&gt;
                  &lt;th&gt;
                      AMT (USD)
                  &lt;/th&gt;
                  &lt;th&gt;
                      LT Days
                  &lt;/th&gt;
                  &lt;th&gt;
                      Desc
                  &lt;/th&gt;
                  &lt;th&gt;
                      Note
                  &lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;tbody&gt;
              &lt;tr&gt;
                  &lt;td&gt;
                      &lt;input class="inputs" type="text" name="abcd" id="PartNumber23" style="width:130px;" /&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;input class="text-box single-line" id="Manufacturer" name="Manufacturer" type="text" value="" /&gt;
                      &lt;span class="field-validation-valid" data-valmsg-for="Manufacturer" data-valmsg-replace="true"&gt;&lt;/span&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;input class="text-box single-line" id="DateCode" name="DateCode" type="text" value="" /&gt;
                      &lt;span class="field-validation-valid" data-valmsg-for="DateCode" data-valmsg-replace="true"&gt;&lt;/span&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;input class="text-box single-line" id="Package" name="Package" type="text" value="" /&gt;
                      &lt;span class="field-validation-valid" data-valmsg-for="Package" data-valmsg-replace="true"&gt;&lt;/span&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;input class="text-box single-line" data-val="true" data-val-number="The field Quantity must be a number." data-val-required="The Quantity field is required." id="Quantity" name="Quantity" style="width:35px;" type="number" value="" /&gt;
                      &lt;span class="field-validation-valid" data-valmsg-for="Quantity" data-valmsg-replace="true"&gt;&lt;/span&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;input class="text-box single-line" id="CustomQuantity" name="CustomQuantity" style="width:35px;" type="text" value="" /&gt;
                      &lt;span class="field-validation-valid" data-valmsg-for="CustomQuantity" data-valmsg-replace="true"&gt;&lt;/span&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;input class="buyingprice text-box single-line" id="BuyingPrice" name="BuyingPrice" type="text" value="" /&gt;
                      &lt;span class="field-validation-valid" data-valmsg-for="BuyingPrice" data-valmsg-replace="true"&gt;&lt;/span&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;input id="bpusd" name="ConvertedBP" readonly="readonly" type="text" value="" /&gt;
                      &lt;span class="field-validation-valid" data-valmsg-for="ConvertedBP" data-valmsg-replace="true"&gt;&lt;/span&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;input id="amtusd" name="ConvertedAmount" readonly="readonly" type="text" value="" /&gt;
                      &lt;span class="field-validation-valid" data-valmsg-for="ConvertedAmount" data-valmsg-replace="true"&gt;&lt;/span&gt;
                      &lt;span id="error" class="error"&gt;&lt;/span&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;input id="LTDays" name="LTDays" type="text" value="" /&gt;
                      &lt;span class="field-validation-valid" data-valmsg-for="LTDays" data-valmsg-replace="true"&gt;&lt;/span&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;select class="drop" id="Description" name="Description"&gt;
                          &lt;option&gt;Original ROHS&lt;/option&gt;
                          &lt;option&gt;ROHS Compliance&lt;/option&gt;
                      &lt;/select&gt;
                      &lt;span class="field-validation-valid" data-valmsg-for="Description" data-valmsg-replace="true"&gt;&lt;/span&gt;
                  &lt;/td&gt;
                  &lt;td&gt;
                      &lt;textarea class="txtarea text-box multi-line" id="Note" name="Note" placeholder="Any Note With Ticket"&gt;&lt;/textarea&gt;
                      &lt;span class="field-validation-valid" data-valmsg-for="Note" data-valmsg-replace="true"&gt;&lt;/span&gt;
                  &lt;/td&gt;
              &lt;/tr&gt;
          &lt;/tbody&gt;
      &lt;/table&gt;
  </code></pre>
  
  <p>it is working perfectly on a single row of textbox but not working on dynamic text boxes, please guide me i'm really stuck on this from hours</p>