"tasks grid"
Bootstrap 3.0.3 Snippet by joaopsfmendes

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <head> <link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"> </head> <div class="container"> <div class="row clearfix"> <div class="col-md-12 column"> <table class="table table-hover" id="tab_logic"> <thead> <tr > <th class="text-center" width="2%"> # </th> <th class="text-center" width="2%">   </th> <th class="text-center"> </th> <th class="text-center"> </th> <th class="text-center"> </th> </tr> </thead> <tbody> <tr id='addr0'> <td> <i class="fa fa-th text-muted"></i> </td> <td> <i class="fa fa-user"></i> </td> <td> <i class="fa fa-envelope-o"> Task name </i> </td> <td> <i class="fa fa-map-marker"> 255 Oak Str, Kohovos, 685 01 </i> </td> <td> <i class="fa fa-calendar"></i> 22.12/.2014 </td> </tr> <tr id='addr1'></tr> </tbody> </table> </div> </div> <a id="add_row" class="btn btn-default pull-left">Add Row</a><a id='delete_row' class="pull-right btn btn-default">Delete Row</a> </div>
$(document).ready(function(){ var i=1; $("#add_row").click(function(){ $('#addr'+i).html($('table tbody tr:first').html()); $('#tab_logic').append('<tr id="addr'+(i+1)+'"></tr>'); i++; }); $("#delete_row").click(function(){ if(i>1){ $("#addr"+(i-1)).html(''); i--; } }); });

Related: See More


Questions / Comments: