-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
78 lines (71 loc) · 1.43 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>tip demo</title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="css/tip.css">
</head>
<body>
<div id="globalTip">
<div>
<i class="waitIcon"></i><p></p>
</div>
</div>
<p> test tip</p>
<script src="js/zepto.min.js"></script>
<script src="js/tip.js" ></script>
<script>
(function(){
var tipDemo = null;
var tipTest = {
init:function(){
this.demo1();
},
demo1:function(){
tipDemo = new Tip();
tipDemo.show();
},
/**
* [demo2 description]
* @return {[type]} [description]
*/
demo2:function(param1,para2){
tipDemo = new Tip();
tipDemo.show("demo2");
},
/**
* 提示显示后不主动消失,可之后再通过调用对象的.hide()方法让元素消失
*/
demo3:function(){
tipDemo = new Tip({
content:"请求发送中-demo3",
hide:false
})
tipDemo.show();
},
/**
* [demo4 description]
* 传一个回调函数
*/
demo4:function(){
tipDemo = new Tip();
tipDemo.show({
content:"demo4",
callBack:function(){
//alert("消失巴啦啦");
}
});
},/**
* [demo5 description]
*/
demo5:function(){
tipDemo = new Tip();
tipDemo.show("提示中-demo5");
}
}
tipTest.init();
})();
</script>
</body>
</html>