-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdemo.html
69 lines (65 loc) · 2.01 KB
/
demo.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
<html>
<head>
<link type="text/css" href="jquery.notifications.css" media="screen" rel="stylesheet" />
<style>
div#container {
position:absolute;
top:400;
left:50;
}
pre#code {
display:none;
}
</style>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
<script type="text/javascript" src="jquery.notifications-1.1.min.js"></script>
<script type="text/javascript">
function showNotice() {
$.n("This is a notice message. It will automatically go away.");
}
function showError() {
$.n.error("This is an error message. It won't go away you have to click the x button.");
}
function showWarning() {
$.n.warning("This is a warning message. It will automatically go away.");
}
function showWithOptions() {
$.n("This message has options.", {
type: "notice",
timeout: 5000,
stick: true,
fadeSpeed : 1500,
close : "close me",
effect : "slide"})
}
</script>
</head>
<body>
<div id="container">
<a href="javascript:void(0);" onclick="showNotice();">show notice</a> |
<a href="javascript:void(0);" onclick="showError();">show error</a> |
<a href="javascript:void(0);" onclick="showWarning();">show warning</a> |
<a href="javascript:void(0);" onclick="showWithOptions();">show using options</a> |
<a href="javascript:void(0);" onclick="$('pre#code').show();">show code</a>
<pre id="code">
function showNotice() {
$.n("This is a notice message");
}
function showError() {
$.n.error("This is an error message. It won't go away you have to click the x button.");
}
function showWarning() {
$.n.warning("This is a warning message");
}
function showWithOptions() {
$.n("This message has options.", {
type: "notice",
timeout: 5000,
stick: true,
fadeSpeed : 1500,
close : "close me",
effect : "slide"})
}
</pre>
</div>
</body>