how to add new row in table using jquery -
i trying add new row in table on button click, adding row no binding dropdown
i have tried
$("#btnaddrow").click(function () { debugger; var value = $("#tnoofrows").val(); (var = 0; < value; i++) { $('#example').clone().appendto('<tr><td><select class="form-control ddlclient" /></td><td><input type="text" class="form-control dtpicker" /> </td><td><input type="text" class="form-control amount" /></td><td><button class="btn bg-teal-400 addinvoice" title="add invoices" data-toggle="modal" data-target="#mymodal"><i class="icon-plus2"></i></button> <input type="button" class="form-control" value="delete" /></td></tr>') } }); $('#example').on('click', 'input[type="button"]', function () { $(this).closest('tr').remove(); });
Comments
Post a Comment