-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
54 lines (48 loc) · 1.49 KB
/
index.html
File metadata and controls
54 lines (48 loc) · 1.49 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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Zepto Plugin jPops</title>
<link rel="stylesheet" href="css/zepto.jpops.tiny.oa.css">
</head>
<body>
<button class="j-alert">alert</button>
<button class="j-confrim">confirm</button>
<script src="js/zepto-min.js"></script>
<script src="js/zepto.jpops.tiny.oa.js"></script>
<script>
$(function(){
$(".j-alert").click(function(){
$.jPops.alert({
icon:"error",
title:"出错啦",
content:"alert信息",
callback:function(r){
if(r){
$("body").append("<div>alert:确定</div>")
}
}
});
});
$(".j-confrim").click(function(){
$.jPops.confirm({
icon:"success",
title:"成功啦",
content:"confirm信息",
okButton:"ok",
cancelButton:"cancel",
callback:function(r){
if(r){
$("body").append("<div>confirm:确定</div>")
}
else{
$("body").append("<div>confirm:取消</div>")
}
}
});
});
});
</script>
</body>
</html>