Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
 
<table width="100%">
 <tbody>
 <tr>
 <td colspan="4" width="100%">
 <h1>title</h1>
 <p>some content</p>
</td>
</tr>
</table>
<table class="history" width="100%">
<tr><td>Dates(Months &amp; Year)</td></tr>
 <tr><td>From</td><td>To</td><td colspan="2">NAME - Company/ College/ Job     Centre/ Armed Services</p>
</td><td colspan="2">Address</td></tr>
<tr>
<td>
    <input name="startDate" id="startDate" class="date-picker" />
</td>
<td>
    <input name="toDate" id="toDate" class="date-picker" />
</td>
<td>
    <input type="text" name="first_name" />
</td>
<td>
    <input type="text" name="last_name" />
</td>
<td>
    <input type="text" name="first_name" />
</td>
<td>
    <input type="text" name="last_name" />
</td>
 </tr>
 </table>
  <a href="#" title="" class="addrow">Add row</a>
 
jQuery(function() {
    var counter = 1;
    var limit = 4;
    jQuery('a.addrow').click(function(event){
      event.preventDefault();
      if (counter == limit)  {
        alert("You have reached the limit of adding " + counter + " inputs");
      } else {
        counter++;
        var newRow = jQuery('<tr><td><input type="text" name="' +
          counter + '"/></td><td><input type="text" name="' +
          counter + '"/></td><td><input type="text" name="' +
          counter + '"/></td><td><input type="text" name="' +
          counter + '"/></td><td><input type="text" name="' +
          counter + '"/></td><td><input type="text" name="' +
          counter + '"/></td></tr>');
        jQuery('table.history').append(newRow);
      }
    });
  });
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
mattbeepro
0viewers