forked from defunkt/facebox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
259 lines (215 loc) · 8.9 KB
/
index.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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
<!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" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Facebox 1.3</title>
<link href="stylesheets/facebox.css" media="screen" rel="stylesheet" type="text/css" />
<link href="stylesheets/default.css" media="screen" rel="stylesheet" type="text/css" />
<script src="javascripts/jquery.js" type="text/javascript"></script>
<script src="javascripts/facebox.js" type="text/javascript"></script>
<script type="text/javascript">
// We have multiple different boxes on this page so each one needs to be initalized and named differently otherwise we'd end up with one big gallery.
// A simple page can just declare it with:
// jQuery(document).ready(function($) {
// $('a[rel=facebox]').facebox();
// });
jQuery(document).ready(function($) {
$('a[rel=faceboxSingle]').facebox({
closeImage : "images/closelabel.gif",
loadingImage : "images/loading.gif",
previousImage : "images/prev.png",
nextImage : "images/next.png"
})
});
jQuery(document).ready(function($) {
$('a[rel=faceboxGallery]').facebox({
closeImage : "images/closelabel.gif",
loadingImage : "images/loading.gif",
previousImage : "images/prev.png",
nextImage : "images/next.png"
})
});
jQuery(document).ready(function($) {
$('a[rel=faceboxDiv]').facebox({
closeImage : "images/closelabel.gif",
loadingImage : "images/loading.gif",
previousImage : "images/prev.png",
nextImage : "images/next.png"
})
});
jQuery(document).ready(function($) {
$('a[rel=faceboxAjax]').facebox({
closeImage : "images/closelabel.gif",
loadingImage : "images/loading.gif",
previousImage : "images/prev.png",
nextImage : "images/next.png"
})
});
</script>
</head>
<body>
<div id="main">
<div id="shadow">
<div id="content">
<div id="logo">
<img src="demo_images/logo.png"/>
</div>
<div class="example">
<h2>What is it?</h2>
<p>
Facebox is a jQuery-based, Facebook-style lightbox which can display images, divs, or entire remote pages.
</p>
<p>
It's simple to use and easy on the eyes. Download the tarball, view the examples, then start enjoying the curves.
</p>
</div>
<div class="example">
<h2>Download</h2>
<p>Requires at least <a href="http://jquery.com">jQuery 1.2.1</a>, but the current version is fine.</p>
<p>
You'll need a loading image, close label, four corners, and solid border images in addition to the javascript and css files. All are included
in the tarball.
</p>
<p>
<strong><a href="releases/facebox-1.3.tar.gz">Download Facebox v1.3</a></strong>
</p>
<p>
You've probably already found it, but the cutting edge source for this plugin can befound on <strong><a href="http://github.com">GitHub</a></strong> here:<br />
<a href="http://github.com/kimos/facebox">http://github.com/kimos/facebox</a>
</p>
<p>
This release is a fork from the original Facebox by defunkt here:<br /><a href="http://github.com/defunkt/facebox">http://github.com/defunkt/facebox</a>
</p>
</div>
<div class="example">
<h2>Need help?</h2>
<p> There's a pretty inactive <a href="http://groups.google.com/group/facebox/">Google Groups mailing list</a>. </p>
<p>You can also try contacting me on gitub <a href="http://github.com/kimos">http://github.com/kimos</a> or email me at <a href="mailto:kimos-github@gleep.ca">kimos-github@gleep.ca</a>.</p>
</div>
<div class="example">
<h2>Image</h2>
<p> <a href="demo_images/image.jpg" rel="faceboxSingle"><img src="demo_images/thumb.jpg" /></a> </p>
<div class="code">
<h3>The Code</h3>
<code><a href="image.jpg" rel="facebox">text</a></code>
</div>
</div>
<div class="example">
<h2>Image Gallery</h2>
<p>
<a href="demo_images/image1.jpg" rel="faceboxGallery"><img src="demo_images/thumb1.jpg" /></a>
<a href="demo_images/image2.jpg" rel="faceboxGallery"><img src="demo_images/thumb2.jpg" /></a>
<a href="demo_images/image3.jpg?123123" rel="faceboxGallery"><img src="demo_images/thumb3.jpg" /></a>
<a href="demo_images/image4.jpg?234234" rel="faceboxGallery"><img src="demo_images/thumb4.jpg" /></a>
<div class="code">
<h3>The Code</h3>
<code>
<a href="full_1.jpg" rel="facebox"><img src="thumbnail_1.jpg" /></a><br />
<a href="full_2.jpg" rel="facebox"><img src="thumbnail_2.jpg" /></a>
</code>
</div>
</div>
<div class="example">
<h2>Divs</h2>
<p> <a href="#info" rel="faceboxDiv">View the 'info' div in the Facebox</a> </p>
<div class="code">
<h3>The Code</h3>
<code><a href="#info" rel="facebox">text</a></code>
</div>
</div>
<div class="example">
<h2>Ajaxes</h2>
<p> <a href="remote.html" rel="faceboxAjax">View 'remote.html' in the Facebox</a> </p>
<div class="code">
<h3>The Code</h3>
<code><a href="remote.html" rel="facebox">text</a></code>
</div>
</div>
<div class="example">
<h2>Load Dependencies</h2>
<p>Make sure jQuery is loaded before Facebox.</p>
<div class="code">
<code>
<script src="jquery.js" type="text/javascript"></script><br/>
<link href="facebox.css" media="screen" rel="stylesheet" type="text/css"/><br/>
<script src="facebox.js" type="text/javascript"></script>
</code>
</div>
</div>
<div class="example">
<h2>Attach It onLoad</h2>
<p>While calling <code>facebox()</code> on any anchor tag will do the trick, it's easier to give your Faceboxy links a <code>rel="facebox"</code> and hit them all onLoad.</p>
<div class="code">
<code>
jQuery(document).ready(function($) {<br/>
$('a[rel=facebox]').facebox() <br/>
})
</code>
</div>
</div>
<div class="example">
<h2>Controlling Facebox Programmatically</h2>
<p>
It's possible to attain a higher level control over Facebox by calling methods directly.
The following will open the Facebox and insert the passed string into it:
</p>
<div class="code">
<h3>Arbitrary Text</h3>
<code>
jQuery.facebox('something cool');<br/>
jQuery.facebox('something cool', 'my-groovy-style');
</code>
<h3>Remote files</h3>
<code>
jQuery.facebox({ ajax: 'remote.html' });<br/>
jQuery.facebox({ ajax: 'remote.html' }, 'my-groovy-style');
</code>
<h3>Image</h3>
<code>
jQuery.facebox({ image: 'stairs.jpg' });<br/>
jQuery.facebox({ image: 'stairs.jpg' }, 'my-groovy-style');
</code>
<h3>A Page Element</h3>
<code>
jQuery.facebox({ div: '#box' });<br/>
jQuery.facebox({ div: '#box' }, 'my-groovy-style');
</code>
</div>
<p>
If you plan to fill the Facebox with the result of an Ajax call, you'll want the loading graphic
displayed whilst your asynchronus task runs. This is the automatic behavior if the <code>facebox()</code>
method is passed a function.
</p>
<div class="code">
<h3>Loading Image Displayed</h3>
<code>
jQuery.facebox(function() { <br/>
jQuery.get('code.js', function(data) {<br/>
jQuery.facebox('<textarea>' + data + '</textarea>')<br/>
})<br/>
})
</code>
</div>
</div>
</div>
</div>
<div id="footer">
<ul>
<li> Code ©2007/2008 Chris Wanstrath </li>
<li> Style ©2007 Facebook </li>
<li>MIT License</li>
</ul>
</div>
</div>
<div id="info" style="display:none;">
<p> Hey, I'm the 'info' div! </p>
<p> I look like this: </p>
<code>
<div id="info" style="display:none;"> <br/>
text<br/>
</div>
</code>
</div>
</body>
</html>