-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
51 lines (35 loc) · 1.27 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
<html>
<head>
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" ></link>
</head>
<body>
<div id="content1" class="scope-context">
<button>Botão 1</button>
<div class="log"></div>
</div>
<div id="content2" class="scope-context">
<button>Botão 2</button>
<div class="log"></div>
</div>
<script src="lib/require.js"></script>
<script src="lib/zepto.js" ></script>
<script src="frame.js" ></script>
<script type="text/javascript">
$(function($){
Scoped.View.extend({
'$el click' : function() {
var txt = this.$el.text();
this.$scope.trigger('console:log', ['clicando com o '+txt]);
}
}).bindTo('button');
var LogPanel = Scoped.View.extend({
'$scope console:log' : function(ev, msg) {
this.$el.append('<p>'+msg+'</p>');
}
});
//LogButton.bindTo('button');
LogPanel.bindTo('.log');
});
</script>
</body>
</html>