1 |
85ad3d82
|
Assos Assos
|
<!DOCTYPE html>
|
2 |
|
|
<html>
|
3 |
|
|
<head>
|
4 |
|
|
<meta charset='utf-8'/>
|
5 |
|
|
<title>Colorbox Examples</title>
|
6 |
|
|
<style>
|
7 |
|
|
body{font:12px/1.2 Verdana, sans-serif; padding:0 10px;}
|
8 |
|
|
a:link, a:visited{text-decoration:none; color:#416CE5; border-bottom:1px solid #416CE5;}
|
9 |
|
|
h2{font-size:13px; margin:15px 0 0 0;}
|
10 |
|
|
</style>
|
11 |
|
|
<link rel="stylesheet" href="colorbox.css" />
|
12 |
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
|
13 |
|
|
<script src="../jquery.colorbox.js"></script>
|
14 |
|
|
<script>
|
15 |
|
|
$(document).ready(function(){
|
16 |
|
|
|
17 |
|
|
$(".group1").colorbox({rel:'group1'});
|
18 |
|
|
$(".group2").colorbox({rel:'group2', transition:"fade"});
|
19 |
|
|
$(".group3").colorbox({rel:'group3', transition:"none", width:"75%", height:"75%"});
|
20 |
|
|
$(".group4").colorbox({rel:'group4', slideshow:true});
|
21 |
|
|
$(".ajax").colorbox();
|
22 |
|
|
$(".youtube").colorbox({iframe:true, innerWidth:640, innerHeight:390});
|
23 |
|
|
$(".vimeo").colorbox({iframe:true, innerWidth:500, innerHeight:409});
|
24 |
|
|
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
|
25 |
|
|
$(".inline").colorbox({inline:true, width:"50%"});
|
26 |
|
|
$(".callbacks").colorbox({
|
27 |
|
|
onOpen:function(){ alert('onOpen: colorbox is about to open'); },
|
28 |
|
|
onLoad:function(){ alert('onLoad: colorbox has started to load the targeted content'); },
|
29 |
|
|
onComplete:function(){ alert('onComplete: colorbox has displayed the loaded content'); },
|
30 |
|
|
onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); },
|
31 |
|
|
onClosed:function(){ alert('onClosed: colorbox has completely closed'); }
|
32 |
|
|
});
|
33 |
|
|
|
34 |
|
|
$('.non-retina').colorbox({rel:'group5', transition:'none'})
|
35 |
|
|
$('.retina').colorbox({rel:'group5', transition:'none', retinaImage:true, retinaUrl:true});
|
36 |
|
|
|
37 |
|
|
|
38 |
|
|
$("#click").click(function(){
|
39 |
|
|
$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
|
40 |
|
|
return false;
|
41 |
|
|
});
|
42 |
|
|
});
|
43 |
|
|
</script>
|
44 |
|
|
</head>
|
45 |
|
|
<body>
|
46 |
|
|
<h1>Colorbox Demonstration</h1>
|
47 |
|
|
<h2>Elastic Transition</h2>
|
48 |
|
|
<p><a class="group1" href="../content/ohoopee1.jpg" title="Me and my grandfather on the Ohoopee.">Grouped Photo 1</a></p>
|
49 |
|
|
<p><a class="group1" href="../content/ohoopee2.jpg" title="On the Ohoopee as a child">Grouped Photo 2</a></p>
|
50 |
|
|
<p><a class="group1" href="../content/ohoopee3.jpg" title="On the Ohoopee as an adult">Grouped Photo 3</a></p>
|
51 |
|
|
|
52 |
|
|
<h2>Fade Transition</h2>
|
53 |
|
|
<p><a class="group2" href="../content/ohoopee1.jpg" title="Me and my grandfather on the Ohoopee">Grouped Photo 1</a></p>
|
54 |
|
|
<p><a class="group2" href="../content/ohoopee2.jpg" title="On the Ohoopee as a child">Grouped Photo 2</a></p>
|
55 |
|
|
<p><a class="group2" href="../content/ohoopee3.jpg" title="On the Ohoopee as an adult">Grouped Photo 3</a></p>
|
56 |
|
|
|
57 |
|
|
<h2>No Transition + fixed width and height (75% of screen size)</h2>
|
58 |
|
|
<p><a class="group3" href="../content/ohoopee1.jpg" title="Me and my grandfather on the Ohoopee.">Grouped Photo 1</a></p>
|
59 |
|
|
<p><a class="group3" href="../content/ohoopee2.jpg" title="On the Ohoopee as a child">Grouped Photo 2</a></p>
|
60 |
|
|
<p><a class="group3" href="../content/ohoopee3.jpg" title="On the Ohoopee as an adult">Grouped Photo 3</a></p>
|
61 |
|
|
|
62 |
|
|
<h2>Slideshow</h2>
|
63 |
|
|
<p><a class="group4" href="../content/ohoopee1.jpg" title="Me and my grandfather on the Ohoopee.">Grouped Photo 1</a></p>
|
64 |
|
|
<p><a class="group4" href="../content/ohoopee2.jpg" title="On the Ohoopee as a child">Grouped Photo 2</a></p>
|
65 |
|
|
<p><a class="group4" href="../content/ohoopee3.jpg" title="On the Ohoopee as an adult">Grouped Photo 3</a></p>
|
66 |
|
|
|
67 |
|
|
<h2>Other Content Types</h2>
|
68 |
|
|
<p><a class='ajax' href="../content/ajax.html" title="Homer Defined">Outside HTML (Ajax)</a></p>
|
69 |
|
|
<p><a class='youtube' href="http://www.youtube.com/embed/VOJyrQa_WR4?rel=0&wmode=transparent">Flash / Video (Iframe/Direct Link To YouTube)</a></p>
|
70 |
|
|
<p><a class='vimeo' href="http://player.vimeo.com/video/2285902" title="Röyksopp: Remind Me">Flash / Video (Iframe/Direct Link To Vimeo)</a></p>
|
71 |
|
|
<p><a class='iframe' href="http://wikipedia.com">Outside Webpage (Iframe)</a></p>
|
72 |
|
|
<p><a class='inline' href="#inline_content">Inline HTML</a></p>
|
73 |
|
|
|
74 |
|
|
<h2>Demonstration of using callbacks</h2>
|
75 |
|
|
<p><a class='callbacks' href="../content/marylou.jpg" title="Marylou on Cumberland Island">Example with alerts</a>. Callbacks and event-hooks allow users to extend functionality without having to rewrite parts of the plugin.</p>
|
76 |
|
|
|
77 |
|
|
|
78 |
|
|
<h2>Retina Images</h2>
|
79 |
|
|
<p><a class="retina" href="../content/daisy.jpg" title="Retina">Retina</a></p>
|
80 |
|
|
<p><a class="non-retina" href="../content/daisy.jpg" title="Non-Retina">Non-Retina</a></p>
|
81 |
|
|
|
82 |
|
|
|
83 |
|
|
<div style='display:none'>
|
84 |
|
|
<div id='inline_content' style='padding:10px; background:#fff;'>
|
85 |
|
|
<p><strong>This content comes from a hidden element on this page.</strong></p>
|
86 |
|
|
<p>The inline option preserves bound JavaScript events and changes, and it puts the content back where it came from when it is closed.</p>
|
87 |
|
|
<p><a id="click" href="#" style='padding:5px; background:#ccc;'>Click me, it will be preserved!</a></p>
|
88 |
|
|
|
89 |
|
|
<p><strong>If you try to open a new Colorbox while it is already open, it will update itself with the new content.</strong></p>
|
90 |
|
|
<p>Updating Content Example:<br />
|
91 |
|
|
<a class="ajax" href="../content/ajax.html">Click here to load new content</a></p>
|
92 |
|
|
</div>
|
93 |
|
|
</div>
|
94 |
|
|
</body>
|
95 |
|
|
</html> |