-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.html
97 lines (72 loc) · 2.16 KB
/
test.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="gamm.js"></script>
</head>
<body>
<div id="test">
<#gamm
<g-table class=''>
<g-thead>
<g-tr>
<g-th>
{{'Test'}}
</g-th>
</g-tr>
</g-thead>
<g-tbody>
<g-tr>
<g-td>
{{this.data.msg}}
</g-td>
</g-tr>
</g-tbody>
</g-table>
#>
<button id="btn">
Alert Me
</button>
<button class="btn-we">
Alert Me1
</button>
<button class="btn-we">
Alert Me2
</button>
<button class="btn-we">
Alert Me3
</button>
<input type="checkbox" id="chk">
</div>
<br>
<br>
<ao-header></ao-header>
<script>
var $ = new Gamm().q;
$(".btn-we:index(1)").on("click",function(){
alert( $("#test").html() );
});
$("#btn" ).on("click",function(){
$(".btn-we:index(1)").text("hahaah");
});
Gamm({
block : "ao-header",
template : "<h1>{{message}}</h1><br><input type='text' name='message' ><textarea name='message1' ></textarea><br><button gamm-events=\"{'click' : 'alert_data'}\">Show Input Text</button>",
data : {
message : "",
message1 : "",
},
events : {
alert_data : function(){
alert(this.data.message);
}
}
});
Gamm({
element : "#test",
data : {
msg : "ahahaha"
}
});
</script>
</body>
</html>