forked from RubyLouvre/avalon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex10visible.html
40 lines (33 loc) · 905 Bytes
/
index10visible.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
<!DOCTYPE HTML>
<html id="html">
<head>
<meta charset="utf-8">
<title>ms-visible</title>
<style>
.rect{
width:100px;
height:100px;
background: red;
display: none;
}
</style>
</head>
<body>
<script src="avalon.js"></script>
<script>
var model = avalon.define("test", function(vm) {
vm.a = true
})
setTimeout(function() {
model.a = false
}, 2000)
setTimeout(function() {
model.a = true
}, 4000)
</script>
<h3>ms-visible</h3>
<div ms-controller="test">
<div class="rect" ms-visible="a" style="border:1px solid red; display: none;text-align: center">visible</div>
</div>
</body>
</html>