Back to list
Views:   0
Replies:  0
Reply 1
There are various ways to do this in jQuery.  One quick thing you can try out is the below code.  But do work with it and tune this for your requirement..(I have just quickly typed this.. you may consider other approaches like individually creating TR/TD elements and adding it).

Assuming table has ID (you can change this)...

ope this helps..
$(function () {
  $("#btnAdd").on("click", function (e) {
    $('#table1 tbody>tr:last').clone(true).insertAfter('#table1 tbody>tr:last');
    $('#table1 tbody>tr:last td').each(function (i,td) {
        $(td).text("some value");

<!DOCTYPE html>
<script src=""></script>
<meta charset=utf-8 />
<title>JS Bin</title>
  <table id="table1" border="1">
      <tr><th>First Name</th>
      <th>Last Name</th></tr>
        <tr><td colspan="2">Constituents</td></tr>
  <input type="button" value="Add Row" id="btnAdd"/>

Rajesh Pillai, Apr 17, 2013
thanks for your response , I want to create a custom menuhandler with composite pattern which will render menu to jquery menu on, Is it possible ,or if it is possible is there be a performance problem ?
Jan 25, 2012
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Licensing       EULA       Sitemap      
© Data & Object Factory, LLC.
Made with    in Austin, Texas