-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
60 lines (58 loc) · 1.54 KB
/
index.html
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
48
49
50
51
52
53
54
55
56
57
58
59
60
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Clone Filtering Test</title>
<style>
[data-template] {
display: none;
}
</style>
</head>
<body id="main_container">
<div id="house-and-lot">
<div class="house">
</div>
<div data-template="bedroom">
<span data-lbl-field="bed"></span>
<p data-class-field="lamp_color">This should have color</p>
<input data-input-field="num_of_pillow"/>
<div data-template="container_pillow">
<p data-lbl-field="pillow"></p>
</div>
<div data-template="container_cabinet">
<p data-lbl-field="dress"></p>
<p data-lbl-field="towel"></p>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-1.7.2.js"></script>
<script src="src/jquery-cloneFiltering.js"></script>
<script>
// no recursive yet
var oData = {
data: {
'bed' : 'This is my bed',
'lamp_color' : 'color-red',
'num_of_pillow': 2,
'container_cabinet' : {
'dress' : 'my dress 1',
'towel': 'my towel 1'
},
'container_pillow' : [{
'pillow' : 'my pillow 1'
}, {
'pillow' : 'my pillow 2'
}]
}
};
$('#house-and-lot').cloneFilter({
clone: {
container: 'div.house',
template : 'div[data-template="bedroom"]',
data : oData
}
});
</script>
</body>
</html>