-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathexample.html
74 lines (65 loc) · 2.19 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>jQuery Popup Window — Example</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="jquery.popupwindow.js"></script>
<script>
$(function() {
$('.example-defaults').on('click', function(event) {
event.preventDefault();
$.popupWindow('http://google.com');
});
$('.example-small').on('click', function(event) {
event.preventDefault();
$.popupWindow('http://google.com', {
width: 200,
height: 200
});
});
$('.example-callback').on('click', function(event) {
event.preventDefault();
$.popupWindow('http://google.com', {
onUnload: function() {
alert('Window closed!');
}
});
});
$('a.center-screen').on('click', function(event) {
event.preventDefault();
$.popupWindow('http://google.com', {
width: 400,
height: 400,
center: 'screen'
});
});
$('a.center-parent').on('click', function(event) {
event.preventDefault();
$.popupWindow('http://google.com', {
width: 400,
height: 400,
center: 'parent'
});
});
});
</script>
</head>
<body>
<h1>jQuery Popup Window Plugin</h1>
<h2>Examples</h2>
<ul>
<li><a href="#" class="example-defaults">Open window (with defaults)</a></li>
<li><a href="#" class="example-small">Open window (custom size: 200x200)</a></li>
<li><a href="#" class="example-callback">Open window (close callback)</a></li>
<li><a href="#" class="center-screen">Open window (centered on screen)</a></li>
<li><a href="#" class="center-parent">Open window (centered on parent)</a></li>
</ul>
<h2>More Details</h2>
<p>
See <a
href="https://github.com/mkdynamic/jquery-popupwindow">https://github.com/mkdynamic/jquery-popupwindow</a>
for more details.
</p>
</body>
</html>