-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathexample.html
156 lines (144 loc) · 6.4 KB
/
example.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>LeaveNotice Example</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.leaveNotice.min.js"></script>
<!-- <script type="text/javascript" src="uncompressed/jquery.leaveNotice.js"></script> -->
<script type="text/javascript">
$(function(){
$('a[target=_blank]').leaveNotice({siteName:'LeaveNotice Test Page'});
//Initiation for example 1
$('a.ex1').leaveNotice();
//Initiation for example 2
$('a.ex2').leaveNotice({
siteName:"LeaveNotice Test Page"
});
//Initiation for example 3
$('a.ex3').leaveNotice({
siteName:"LeaveNotice Test Page",
exitMessage:"<h1>Say goodbye to<br/> {SITENAME}!</h1><p>Thanks. Shut the door behind you!</p>"
});
//Initiation for example 4
$('a.ex4').leaveNotice({
siteName:"LeaveNotice Test Page",
exitMessage:"<h3>Say goodbye to {SITENAME}!</h3><p>Thanks. Shut the door behind you!</p>",
preLinkMessage:"<hr/><p>Have fun at:<br/><strong>{URL}</strong></p><hr/>"
});
//Initiation for example 5
$('a.ex5').leaveNotice({
siteName:"LeaveNotice Test Page",
timeOut:0
});
//Initiation for example 7
$('a.ex6').leaveNotice({
siteName:"LeaveNotice Test Page",
newWindow:true
});
//Initiation for example 7
$('a.ex7').leaveNotice({
siteName:"LeaveNotice Test Page",
exitMessage:"<h3>Say goodbye to {SITENAME}!</h3><p>Thanks. Shut the door behind you!</p>",
preLinkMessage:"<hr/><p>Have fun at:<br/><strong>{URL}</strong></p><hr/>",
overlayId:"custom-blackout",
messageBoxId:"custom-messageBox",
messageBoxHolder:"custom-messageHolder",
overlayAlpha:0.6
});
});
</script>
<style type="text/css">
#custom-blackout {position:fixed; top:0; left:0; width:100%; height:100%; background-color:#514004;}
#custom-messageHolder {position:fixed; top:200px; left:0; width:100%;}
#custom-messageBox {width:400px; margin:0 auto; padding:120px 50px 20px 50px; background:#333 url(img/custom-msg-box-bg.png) no-repeat top center; color:#fff; text-align:center; border:5px solid #F8DA07; -moz-border-radius:15px; -webkit-border-radius:15px;}
#custom-messageBox * {color:#fff;}
#custom-messageBox hr {border-color:#666;}
#custom-messageBox a#ln-cancelLink {background-color:#666; color:#333;}
</style>
<link rel="stylesheet" type="text/css" href="css/jquery.leaveNotice.css" />
<link rel="stylesheet" type="text/css" href="leaveNoticeDocs.css" /></head>
<body>
<div id="header">
<h1>LeaveNotice Test Page</h1>
</div>
<div id="nav">
<p><a href="index.html">« Back to docs</a></p>
<hr />
<p><a href="http://rewdy.com/tools/leavenotice-jquery-plugin/">LeaveNotice Plugin Page</a></p>
<p><a href="http://www.jquery.com">jQuery</a></p>
<p><a href="http://www.rewdy.com">Rewdy.com</a></p>
</div>
<div id="side">
<h3>Outbound Links</h3>
<p><em>Click to see demonstration of LeaveNotice.</em></p>
<ul>
<li><a href="http://www.google.com" target="_blank">Google</a></li>
<li><a href="http://awkwardfamilyphotos.com/" target="_blank">Awkward Family Photos</a></li>
<li><a href="http://www.jquery.com" target="_blank">jQuery</a></li>
</ul>
</div>
<div id="main_narrow">
<h2>LeaveNotice Examples</h2>
<h3>1. Default Implementation <span>(no options set)</span></h3>
<p><a href="http://www.google.com" class="ex1" title="Example Site">Example Link</a></p>
<code class="block">$('a.ex1').leaveNotice();</code>
<hr/>
<h3>2. Standard Implementation <span>(only siteName set)</span></h3>
<p><a href="http://www.google.com" class="ex2">Example Link</a></p>
<code class="block">$('a.ex2').leaveNotice({
siteName:"LeaveNotice Test Page"
});</code>
<hr/>
<h3>3. Custom Exit Message</h3>
<p><a href="http://www.google.com" class="ex3">Example Link</a></p>
<code class="block">$('a.ex3').leaveNotice({
siteName:'LeaveNotice Test Page',
exitMessage:"<h1>Say goodbye to<br/> {SITENAME}!</h1><p>Thanks. Shut the door behind you!</p>"
});</code>
<hr/>
<h3>4. Custom Exit Message and Custom preLinkMessage</h3>
<p><a href="http://www.google.com" class="ex4">Example Link</a></p>
<code class="block">$('a.ex4').leaveNotice({
siteName:"LeaveNotice Test Page",
exitMessage:"<h3>Say goodbye to {SITENAME}!</h3><p>Thanks. Shut the door behind you!</p>",
preLinkMessage:"<hr/><p>Have fun at:<br/><strong>{URL}</strong></p><hr/>"
});</code>
<hr/>
<h3>5. No Timer Set <span>(User has to specifically click the link)</span></h3>
<p><a href="http://www.google.com" class="ex5">Example Link</a></p>
<code class="block">$('a.ex5').leaveNotice({
siteName:"LeaveNotice Test Page",
timeOut:0
});</code>
<hr/>
<h3>6. Open Link in New Window</h3>
<p><a href="http://www.google.com" class="ex6">Example Link</a></p>
<code class="block">$('a.ex6').leaveNotice({
siteName:"LeaveNotice Test Page",
newWindow:true
});</code>
<hr/>
<h3>7. Custom IDs elements <span>(and custom styles)</span></h3>
<p><a href="http://www.google.com" class="ex7">Example Link</a></p>
<p><strong>Javscript</strong></p>
<code class="block">$('a.ex7').leaveNotice({
siteName:"LeaveNotice Test Page",
exitMessage:"<h3>Say goodbye to {SITENAME}!</h3><p>Thanks. Shut the door behind you!</p>",
preLinkMessage:"<hr/><p>Have fun at:<br/><strong>{URL}</strong></p><hr/>",
overlayId:"custom-blackout",
messageBoxId:"custom-messageBox",
messageBoxHolder:"custom-messageHolder",
overlayAlpha:0.6
});</code>
<p><strong>CSS</strong></p>
<code class="block">#custom-blackout {position:fixed; top:0; left:0; width:100%; height:100%; background-color:#514004;}
#custom-messageHolder {position:fixed; top:200px; left:0; width:100%;}
#custom-messageBox {width:400px; margin:0 auto; padding:120px 50px 20px 50px; background:#333 url(img/custom-msg-box-bg.png) no-repeat top center; color:#fff; text-align:center; border:5px solid #F8DA07; -moz-border-radius:15px; -webkit-border-radius:15px;}
#custom-messageBox * {color:#fff;}
#custom-messageBox hr {border-color:#666;}
#custom-messageBox a#ln-cancelLink {background-color:#666; color:#333;}</code>
<p><a href="#">Top</a></p>
</div>
</body>
</html>