<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">$(function () {
    
    "use strict";

    // for single input
    
    $("#add_row").on('click',function () {
        var html = '';
        html+='&lt;div  id="remove"&gt;';
        html+='&lt;label for=""&gt;Name&lt;/label&gt;';
        html+='&lt;div class="medicine_row_input"&gt;';

        html+='&lt;input type="text" name="name[]"&gt;';
        html+='&lt;button type="button" id="removeRow" &gt;&lt;i class="fas fa-trash" aria-hidden="true"&gt;&lt;/i&gt;&lt;/button&gt;';
        html+='&lt;/div&gt;';
        html+='&lt;/div&gt;';
        $("#medicine_row").append(html)
    });

    // remove custom video input field row
    $(document).on('click', '#removeRow', function () {
        $(this).closest('#remove').remove();
    });

    
    
  // for 2 input in 1 row

  $("#add_row3").on('click',function () {
    var html = '';
    html+='&lt;div class="row" id="remove"&gt;';
    html+='&lt;div class="col-xl-5 col-md-5"&gt;';
    html+='&lt;div class="medicine_row_input"&gt;';
    html+='&lt;input type="text" placeholder="www.facebook.com" name="name[]" id="name"&gt;';
    html+='&lt;/div&gt;';
    html+='&lt;/div&gt;';
    html+='&lt;div class="col-xl-5 col-md-5"&gt;';
    html+='&lt;div class="medicine_row_input"&gt;';
    html+='&lt;input type="text" placeholder="www.youtube.com" name="name[]" id="name"&gt;';
    html+='&lt;/div&gt;';
    html+='&lt;/div&gt;';
    html+='&lt;div class="col-xl-2 col-md-2"&gt;';
    html+='&lt;div class="medicine_row_input"&gt;';
    html+='&lt;button type="button" id="removeRow" &gt;&lt;i class="fas fa-trash" aria-hidden="true"&gt;&lt;/i&gt;&lt;/button&gt;';
    html+=' &lt;/div&gt;';
    html+=' &lt;/div&gt;';
    html+='&lt;/div&gt;';
    $("#medicine_row3").append(html)
  });

  // remove custom input field row
  $(document).on('click', '#removeRow', function () {
    $(this).closest('#remove').remove();
  });

    
});
</pre></body></html>