forked from bitovi/jquerypp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubscribe.html
More file actions
56 lines (53 loc) · 1.51 KB
/
subscribe.html
File metadata and controls
56 lines (53 loc) · 1.51 KB
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<title>hover</title>
<style type='text/css'>
body {font-family: verdana}
.error {border: solid 1px red;}
.error_text { color: red; font-size: 10px;}
td {padding: 3px;}
.subscribe, .subscribes {
border: solid 1px green;
}
.subscribed {
background-color: yellow;
}
.mysubscribe {
border: solid 1px red;
}
</style>
</head>
<body>
<div id="testSubscribe">
<div id="subscribe1">
subscribe me
</div>
<h2><a href="#" id="off">Turn OFF Above</a></h2>
</div>
<script type='text/javascript'
src='../../../steal/steal.js'>
</script>
<script type='text/javascript'>
steal('jquerypp/controller/subscribe').then(function(){
$.Controller('subscribeTest',{
onDocument: false
},
{
"#subscribe1 click": function(el, ev){
ev.stopPropagation();
this.publish("oaSubscribe1", {"params":"Hola Mundo"});
},
"oaSubscribe1 subscribe": function(called, data){
alert("subscribe1 " + data.params + " : " + this.Class.shortName);
}
});
var subscribeController = new subscribeTest($("#testSubscribe")[0]);
$("#off").bind("click",function(){
subscribeController.destroy();
})
});
</script>
</body>
</html>