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>&nbsp<input type="button" class="form-control"  value="delete" /></td></tr>')              }         });         $('#example').on('click', 'input[type="button"]', function () {             $(this).closest('tr').remove();         }); 


Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

python - ValueError: No axis named 1 for object type <class 'pandas.core.series.Series'> -

java - How to provide dependency injections in Eclipse RCP 3.x? -