title: How to get value from dynamically created inputs jquery
body: <p>Value from a added field return undefined.</p>
  
  <p>my added input</p>
  
  <pre><code> var i = 1;
  $('#add_field').click(function(){
     i++;
      $('#dynamic_field').append('&lt;tr id="row'+i+'"&gt;&lt;td class="col-md-5"&gt;&lt;textarea id="name" class="borders table-control" type="text" rows="1" cols="45" name="name[]"&gt;&lt;/textarea&gt;&lt;/td&gt;&lt;td class="col-md-2"&gt;&lt;input class="borders table-control price" type="text" id="price name="price[]"&gt;&lt;/td&gt;&lt;td class="col-md-2"&gt;&lt;input class="borders table-control qty" id="qty" type="text" name="qty[]"&gt;&lt;/td&gt;&lt;td class="col-md-2"&gt;&lt;input class="form-control total" id="total" type="text" name="total[]"&gt;&lt;/td&gt;&lt;td class="text-center"&gt;&lt;span id="'+i+'" style="color: red" name="remove" class="btn_remove"&gt;&lt;i class="fa fa-times" aria-hidden="true"&gt;&lt;/i&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;');
  
  });
  </code></pre>
  
  <p>this is my jquery code to get values from inputs</p>
  
  <pre><code>$(document).on('change', '#dynamic_field', function(event){
  
  
      var id = $('#prod_id').val();  &lt;----I got the id.
  
      var name = $('#name').val();  &lt;-----cant get value name 
      var price = $("#price").val();  &lt;-----cant get value price 
      var qty = $("#qty").val();  &lt;-----cant get value qty 
      var total = $("#total").val();  &lt;-----cant get value total
  </code></pre>
  
  <p>any idea? thanks </p>