-
Notifications
You must be signed in to change notification settings - Fork 0
/
popup.html
77 lines (67 loc) · 2.29 KB
/
popup.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>SimpleUI</title>
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0">
<meta name="format-detection" content="telephone=no">
<meta name="format-detection" content="email=no">
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<link href="../dist/style/simpleui.css" rel="stylesheet" type="text/css">
</head>
<body>
<ul class="sui-list sui-list-link sui-mtb20 sui-border-tb">
<li id="btn1">Push</li>
<li id="btn2">Modal</li>
<li id="btn3">Menu</li>
<li id="btn4">Plate</li>
</ul>
<div id="popup1" class="sui-popup-container">
<div class="sui-popup-mask"></div>
<div class="sui-popup-modal">
<!--内容开始-->
<ul class="sui-list sui-list-link">
<li class="open-popup" data-target="popup2">继续打开新窗口</li>
<li id="closeButton">关闭Popup-1</li>
</ul>
<!--内容结束-->
</div>
</div>
<div id="popup2" class="sui-popup-container">
<div class="sui-popup-mask"></div>
<div class="sui-popup-modal">
<!--内容开始-->
<ul class="sui-list sui-list-link">
<li class="close-popup" data-target="popup2">关闭Popup-2</li>
</ul>
<!--内容结束-->
</div>
</div>
<script src="../dist/js/zepto.min.js"></script>
<script src="../dist/js/simpleui.min.js"></script>
<script>
$(function() {
// 使用push方式打开
$('#btn1').click(function() {
$('#popup1').popup('push');
});
// 使用modal方式打开
$('#btn2').click(function() {
$('#popup1').popup('modal');
});
// 使用侧边看菜单方式打开
$('#btn3').click(function() {
$('#popup1').popup('menu');
});
// 使用托盘方式打开
$('#btn4').click(function() {
$('#popup1').popup('plate');
});
// 关闭
$('#closeButton').click(function() {
$('#popup1').closePopup();
});
});
</script>
</body>
</html>