Revision 343137636138 () - Diff

Link to this snippet: https://friendpaste.com/RerbcNubKq0mbzagcQOCq
Embed:
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
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<script src="../libs/jquery.js" type="text/javascript" charset="utf-8"></script>
<script src="../libs/pure2.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<table id="sale_items">
<tr class="sale_items">
<td><button class="void_item">X</button></td>
<td>
<span class="inventory_number"></span><br>
<span class="category"></span>
</td>
<td><span class="description"></span></td>
<td>
<input class="quantity@value">
@
<input class="selling_price@value">
</td>
</tr>
</table>
<input type="button" onclick="test()" value="test" />
<script>
var data = [
{
inventory_number: "I-9000",
category: "[INV]",
description: "testing",
quantity: "1",
selling_price: "19.99"
},
{
inventory_number: "I-9000",
category: "[INV]",
description: "testing",
quantity: "1",
selling_price: "19.99"
}],
template = $("#sale_items").compile(false, {sale_items:data}),
test = function(){
$("#sale_items").render({sale_items:data}, template);
};
</script>
</body>
</html>