JSFiddle - React, Tailwind, and code Playground
by FaTe
HTML
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://dersimizisg.com/link/temp/vendors/jquery.maskedinput.min.js"></script>
<table class="table" id="customFields">
<thead>
<tr>
<th>name</th>
<th>title</th>
<th>phone</th>
<th>ex</th>
<th>email</th>
<th>#</th>
</tr>
</thead>
<tbody>
<tr>
<td><input type="text" name="adsoyad[]" style="width:130px"/></td>
<td><input type="text" name="gorevi[]" style="width:130px"/></td>
<td><input type="text" id="phone" name="telefon[]" style="width:130px"/></td>
<td><input type="text" name="dahili[]" style="width:70px"/></td>
<td><input type="email" name="eposta[]" style="width:190px"/></td>
<td><a href="javascript:void(0);" class="addCF">Add</a></td>
</tr>
</tbody>
</table>
JavaScript
$(document).ready(function(){
var cnt = 2;
$(".addCF").click(function(){
$("#customFields").append('<tr><td><input type="text" name="adsoyad[]" style="width:130px"/></td><td><input type="text" name="gorevi[]" style="width:130px"/></td><td><input type="text" id="phone" name="telefon[]" style="width:130px"/></td><td><input type="text" name="dahili[]" style="width:70px"/></td> <td><input type="email" name="eposta[]" style="width:190px"/></td><td><a href="javascript:void(0);" class="remCF"><span class="btn">-</span></a></td></tr>');
cnt++;
});
$("#customFields").on('click','.remCF',function(){
if (confirm("Silmek istediÄźinizden emin misiniz?"))
{
$(this).parent().parent().remove();
}
});
});
jQuery(function($){
$("#phone").mask("(999) 999-9999");
});