-
Notifications
You must be signed in to change notification settings - Fork 28
/
index.html
384 lines (336 loc) · 15.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
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
<!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>facybox 1.2.3</title>
<link href="facybox.css" media="screen" rel="stylesheet" type="text/css" />
<link href="facybox_urls.css" media="screen" rel="stylesheet" type="text/css" />
<link href="demo/faceplant.css" media="screen" rel="stylesheet" type="text/css" />
<!-- always get the last jquery version -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js" type="text/javascript"></script>
<script src="facybox.js" type="text/javascript"></script>
<script type="text/javascript">
jQuery(document).ready(function($) {
$('a[rel*=facybox]').facybox({
// noAutoload: true
});
$("h2",$("#changelog")).css("cursor","pointer").click(function(){
$(this).next().slideToggle('fast');
}).trigger("click");
});
</script>
</head>
<body>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="business" value="gmauwolff@gmail.com">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="item_name" value="Facybox">
<input type="hidden" name="item_number" value="Facybox's Donation">
<input type="hidden" name="currency_code" value="USD">
<img alt="" border="0" width="1" height="1" src="https://www.paypal.com/en_US/i/scr/pixel.gif" >
<button id="donate" type="submit">
If you use FacyBox and like it, buy the author a coffe!
</button>
</form>
<div id="main">
<div id="shadow">
<div id="content">
<div id="logo">
<img src="demo/logo-facybox.png" width="264" height="90" alt="facyBox" >
</div>
<div class="example news" id="changelog">
<h2>Changelog</h2>
<ul>
<li>1.2.3 - Changed jQuery to 1.8.3 (1.9+ will break because of $.browser)</li>
<li>1.2.1 - Added <em>packetmonkey</em>'s code to recognize Content-type headers sent by the server</li>
<li>1.2 - Added support for Internet Explorer
<ul>
<li>transparent pngs</li>
<li>overlay css fix</li>
<li>faster facybox.close</li>
<li>fixed .w and .e width</li>
</ul>
</li>
<li>1.2 - $.fn.fixPNG added to jQuery, you can use in other pngs with: <em>$(".yourclass").fixPNG()</em></li>
<li>1.1 - Stripped img urls from <em>facybox.css</em> to <em>facybox_urls.css</em> (the last is imported)</li>
<li>1.1 - Image gallery</li>
<li>1.1 - Facybox centralizes vertically if content height is smaller then window height</li>
</ul>
</div>
<div class="example">
<h2>What is it?</h2>
<p>
A jQuery-based, Facebook/Fancybox-style lightbox which can display images, divs, or entire remote pages.
</p>
<p>
It's simple to use and easy on the eyes. <a href="http://github.com/mwolff/facyBox/">Clone it from github</a>, view the examples below, then start enjoying the shadows.
</p>
</div>
<div class="example">
<h2>Why another lightbox? And so similar to Facebox or Fancybox?</h2>
<p>
<a href="http://famspam.com/facebox">FamSpam's facebox</a> is great, but the visual is too facebookish (well that's the way they wanted it).
<a href="http://fancybox.net">Fancybox</a> is great, but programmatically dealing with it is hard (you have to create an element on the fly and trigger a click on it).
</p>
<p>
So, instead of using one or another, a mashup was created. Basically is a facebox with fancybox look.
</p>
</div>
<div class="example">
<h2>Download</h2>
<p>Requires <a href="http://jquery.com">jQuery >= 1.2+</a>. <b>Important:</b> 1.9+ will break facybox. Wait for a new version.</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 package.
</p>
<p>
<strong><a href="http://github.com/mwolff/facyBox/">Download facybox from github.com</a></strong>
</p>
<p>
Want to live on the edge?
<ul style="font-size: 0.8em">
<li><a href="http://github.com/defunkt/facebox">http://github.com/defunkt/facebox</a> — Original Facebox </li>
<li><a href="http://fancybox.net/">http://fancybox.net/</a> — Original Fancybox</li>
<li><a href="http://github.com/mwolff/facyBox/" title="mwolff's facyBox - GitHub">http://github.com/mwolff/facyBox/</a> — mWolff facyBox</li>
</ul>
</p>
</div>
<div class="example">
<h2>Help!</h2>
<p> Need help? Check out the <a href="http://wiki.github.com/mwolff/facybox">Wiki</a>.</p>
</div>
<div class="example news">
<h2>Images</h2>
<p> <a href="http://th03.deviantart.net/fs39/300W/i/2008/350/4/9/escalator_by_mickeyxmouse.jpg" rel="facybox">View escalator_by_mickeyxmouse.jpg</a> (from <a href="http://mickeyxmouse.deviantart.com/art/escalator-106463182">Deviantart</a>) in the facybox </p>
<div class="code">
<h3>The Code</h3>
<code>
<a href="http://th..yxmouse.jpg" rel="facybox">View escalator_by_mickeyxmouse.jpg</a>
</code>
</div>
</div>
<div class="example news">
<h2>Galleries</h2>
<p>
<a style="cursor: pointer" id="open_gallery">open gallery</a>
you can navigate by left-arrow/right-arrow too
</p>
<script>
jQuery('#open_gallery').click(function(){
jQuery.facybox({images:['http://th01.deviantart.net/fs50/300W/f/2009/257/7/f/Vintage_by_ValentinaKallias.jpg','http://th07.deviantart.net/fs51/300W/f/2009/257/c/0/c0a43b00118655bd2804bc931589a47f.jpg', 'http://th03.deviantart.net/fs50/300W/f/2009/257/d/6/Lost_room_by_fogke.jpg']})
});
</script>
<div class="code">
<h3>The Code</h3>
<code>
<pre>
jQuery('#open_gallery').click(function(){
jQuery.facybox({images:['demo/logo-facybox.png','images/coffee_48x48.png']})
}); </pre>
</code>
</div>
</div>
<div class="example news">
<h2>Divs</h2>
<p> <a href="#info" rel="facybox">View the 'info' div in the facybox</a> </p>
<div class="code">
<h3>The Code</h3>
<code><a href="#info" rel="facybox">View the 'info' div in the facybox</a></code>
</div>
</div>
<div class="example news">
<h2>Ajaxes</h2>
<p> <a href="demo/remote.html" rel="facybox">View 'remote.html' in the facybox</a> </p>
<p> <a href="demo/del.php" rel="facybox">This one is a PHP file with a 5 seconds delay (to view the loading image)</a> </p>
<div class="code">
<h3>The Code</h3>
<code><a href="demo/remote.html" rel="facybox">View 'remote.html' in the facybox</a></code>
</div>
</div>
<div class="example news">
<h2>On Page Load, Programmatically</h2>
<p>You can load any arbitrary html, or any other content with a few lines of code:</p>
<div class="code">
<h3>The Code to load html</h3>
<code>
<pre>
<script type="text/javascript">
$(function(){
$.facybox("<h3>This is a title</h3><p>and this is a text</p>");
})
</script>
</pre>
</code>
<h3>To load a remote page:</h3>
<code>
<pre>
<script type="text/javascript" charset="utf-8">
$(function(){
$.ajax({
url: "demo/remote.html",
success: function(data){
$.facybox(data);
}
});
})
</script>
</pre>
</code>
<h3>To load a gallery:</h3>
<code>
<pre>
<script type="text/javascript" charset="utf-8">
$(function(){
jQuery.facybox({images:['demo/logo-facybox.png','http://th03.deviantart.net/fs50/300W/f/2009/257/d/6/Lost_room_by_fogke.jpg']})
})
</script>
</pre>
</code>
</div>
</div>
<div class="example">
<h2>Load Dependencies</h2>
<p>Make sure jQuery is loaded <strong>before</strong> facybox.</p>
<div class="code">
<code style="white-space: nowrap">
<!-- This gets the latest jQ 1.x from google, minified and gziped --><br />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script><br />
<link href="facybox.css" media="screen" rel="stylesheet" type="text/css"/><br/>
<script src="facybox.js" type="text/javascript"></script>
</code>
</div>
<p><strong>Important:</strong> You don't need to reference <em>facybox_urls.css</em>, but the file must be at the same place as <em>facybox.css</em></p>
</div>
<div class="example">
<h2>Attach It onLoad</h2>
<p>While calling <code>facybox()</code> on any anchor tag will do the trick, it's easier to give your facyboxed links a <code>rel="facybox"</code> and hit them all onLoad.</p>
<div class="code">
<code>
jQuery(document).ready(function($) {<br/>
$('a[rel*=facybox]').facybox() <br/>
})
</code>
</div>
</div>
<div class="example news">
<h2>Extra Classes</h2>
<p>
You can give the facybox container an extra class (to fine-tune the display of reusable remote pages)
with the <code>facybox[.class]</code> rel syntax.
</p>
<p>
Maybe your <i>Terms and Conditions</i> can be loaded standalone or via facybox. When loaded in facybox,
you might want to tweak some styles -- like making the <code>h1</code> positioned absolutely?
</p>
<p>
<a href="demo/remote.html" rel="facybox.bolder">
View an an example which makes the <code>remote.html</code> page bigger and bolder using css.
</a>
</p>
<div class="code">
<h3>The Code</h3>
<code><a href="demo/remote.html" rel="facybox.bolder">text</a></code>
</div>
</div>
<div class="example">
<h2>Controlling facybox Programmatically</h2>
<p>
It's possible to attain a higher level control over facybox by calling methods directly.
The following will open the facybox and insert the passed string into it:
</p>
<div class="code">
<h3>Arbitrary Text</h3>
<code>
jQuery.facybox('something cool');<br/>
jQuery.facybox('something cool', 'my-groovy-style');
</code>
<h3>Remote files</h3>
<code>
jQuery.facybox({ ajax: 'demo/remote.html' });<br/>
jQuery.facybox({ ajax: 'demo/remote.html' }, 'my-groovy-style');
</code>
<h3>Image</h3>
<code>
jQuery.facybox({ image: 'demo/stairs.jpg' });<br/>
jQuery.facybox({ image: 'demo/stairs.jpg' }, 'my-groovy-style');
</code>
<h3>A Page Element</h3>
<code>
jQuery.facybox({ div: '#box' });<br/>
jQuery.facybox({ div: '#box' }, 'my-groovy-style');
</code>
</div>
<p>
If you plan to fill the facybox 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>facybox()</code>
method is passed a function.
</p>
<div class="code">
<h3>Loading Image Displayed</h3>
<code>
jQuery.facybox(function() { <br/>
jQuery.get('code.js', function(data) {<br/>
jQuery.facybox('<textarea>' + data + '</textarea>')<br/>
})<br/>
})
</code>
</div>
</div>
<div class="example news">
<h2>Some extra demos</h2>
<p>Some cool pictures from Deviant.com:</p>
<div id="screenshots">
<a href="http://th05.deviantart.net/fs50/300W/f/2009/257/9/5/Alice_cards_by_Sugarock99.jpg" rel="facybox"><img src="http://th05.deviantart.net/fs50/150/f/2009/257/9/5/Alice_cards_by_Sugarock99.jpg"></a>
<a href="http://th01.deviantart.net/fs50/300W/f/2009/257/7/f/Vintage_by_ValentinaKallias.jpg" rel="facybox"><img src="http://th01.deviantart.net/fs50/150/f/2009/257/7/f/Vintage_by_ValentinaKallias.jpg"></a>
<a href="http://th07.deviantart.net/fs51/300W/f/2009/257/c/0/c0a43b00118655bd2804bc931589a47f.jpg" rel="facybox"><img src="http://th07.deviantart.net/fs51/150/f/2009/257/c/0/c0a43b00118655bd2804bc931589a47f.jpg"></a>
<a href="http://th03.deviantart.net/fs50/300W/f/2009/257/d/6/Lost_room_by_fogke.jpg" rel="facybox"><img src="http://th03.deviantart.net/fs50/150/f/2009/257/d/6/Lost_room_by_fogke.jpg"></a>
</div>
</div>
<div class="example">
<h2>Thanks <span class="amp">&</span> Contact</h2>
<p>
Thanks to Facebook for the idea and style. Thanks to Mindy Tchieu for her help in getting this working.
</p>
<p> <strong>from mWolff:</strong> Thanks to defunkt for Facebox and janis.skarnelis for Fancybox.</p>
<p>
Comments, concerns, complaints, criticisms, confessions? Email me: <script type="text/javascript">document.write(
"<n uers=\"znvygb:z\100ovgobafnv\056pbz\">z\100ovgobafnv\056pbz<\057n>".replace(/[a-zA-Z]/g, function(c){return String.fromCharCode((c<="Z"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);}));
</script>
</div>
</div>
</div>
<div id="footer">
<p class="right">
<script type="text/javascript">document.write(
"<n uers=\"znvygb:z\100ovgobafnv\056pbz\">z\100ovgobafnv\056pbz<\057n>".replace(/[a-zA-Z]/g, function(c){return String.fromCharCode((c<="Z"?90:122)>=(c=c.charCodeAt(0)+13)?c:c-26);}));
</script>
</p>
<ul>
<li> Facebox Code ©2007/2008 Chris Wanstrath </li>
<li> Fancybox Code ©2008 - 2009 @ http://kac.klade.lv/</li>
<li> Facybox Code ©2009 ad eternum mWolff aka Mauricio Wolff</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>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-10638205-1");
pageTracker._trackPageview();
} catch(err) {}</script>
</body>
</html>