"furniture-calc"
Bootstrap 3.3.0 Snippet by raiverma

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<script src="http://malsup.github.io/min/jquery.cycle2.min.js"></script>
<div class="container">
<div class="row clearfix">
<div class="col-md-8 column">
<table class="table table-bordered table-hover" id="tab_logic">
<thead>
<tr >
<th class="text-center">
#
</th>
<th class="text-center">
Area Name
</th>
<th class="text-center">
Width
</th>
<th class="text-center">
Height
</th>
<th class="text-center">
Total Area MT<sup>2</sup>
</th>
</tr>
</thead>
<tbody>
<tr id='addr0'>
<td>
1
</td>
<td>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
$(document).ready(function(){
var i=1;
var gtw=0;
$(".add_row").click(function(){
GrandTotal();
$('#addr'+i).append("<td>"+ (i+1) +"</td><td><input id='pn"+i+"' name='pn"+i+"' type='text' placeholder='Product Name' class='form-control input-md' /> </td> <td><input id='pw"+i+"' value='0' name='pw"+i+"' type='text' placeholder='Watt' class='form-control input-md txt'></td><td><input id='pq"+i+"' name='pq"+i+"' type='text' value='0' placeholder='Quantity' class='form-control input-md txt'></td><td><input id='el"+i+"' name='el"+i+"' value='0' type='text' readonly placeholder='Electricity Load' class='form-control input-md'></td> <td><button id='btn"+i+"' class='btn btn-success new_row'>+</button></td>");
$('#tab_logic').append('<tr id="addr'+(i+1)+'"></tr>');
var rno=i-1;
var pw=$('#pw'+rno).val();
var pq=$('#pq'+rno).val();
var tw=pw*pq;
$('#el'+rno).val(tw);
i++;
});
$(document).on("click","button.del_row",function()
{
var rowId=$(this).parent().parent().attr("id");
$("#"+rowId).remove();
GrandTotal();
});
$(document).on("click","button.new_row",function()
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: