85 lines
4.9 KiB
HTML
85 lines
4.9 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
<title>ColorBox Examples</title>
|
|
<style type="text/css">
|
|
body{font:12px/1.5 Verdana, Arial, san-serrif;}
|
|
a:link, a:visited{text-decoration:none; color:#416CE5; border-bottom:1px solid #416CE5;}
|
|
h2{font-size:13px;}
|
|
.hidden{display:none;}
|
|
</style>
|
|
<link type="text/css" media="screen" rel="stylesheet" href="colorbox.css" />
|
|
<!--[if IE]>
|
|
<link type="text/css" media="screen" rel="stylesheet" href="colorbox-ie.css" title="example" />
|
|
<![endif]-->
|
|
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
|
|
<script type="text/javascript" src="../colorbox/jquery.colorbox.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
//Examples of how to assign the ColorBox event to elements.
|
|
$("a[rel='jack']").colorbox({transition:"fade"});
|
|
$("a[rel='dogs']").colorbox({transition:"elastic"});
|
|
$("a[rel='river']").colorbox({transition:"none", width:"75%", height:"75%"});
|
|
$(".slideshow").colorbox({slideshow:true});
|
|
$("a.single").colorbox({}, function(){
|
|
alert('Howdy, this is an example callback.');
|
|
});
|
|
$("a[title='Homer Defined']").colorbox();
|
|
$(".flash").colorbox({href:"../content/flash.html"});
|
|
$("a[href='http://google.com']").colorbox({width:"80%", height:"80%", iframe:true});
|
|
|
|
//Example of preserving a JavaScript event for inline calls.
|
|
$("#click").click(function(){
|
|
$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
|
|
return false;
|
|
});
|
|
$("#inline").colorbox({width:"50%", inline:true, href:"#inline_example1", title:"hello"});
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<h1>ColorBox Examples</h1>
|
|
<h2>fade transition</h2>
|
|
<p><a href="../content/ohoopee1.jpg" rel="jack" title="Me and my grandfather on the Ohoopee">Grouped Photo 1</a></p>
|
|
<p><a href="../content/ohoopee2.jpg" rel="jack" title="On the Ohoopee as a child">Grouped Photo 2</a></p>
|
|
<p><a href="../content/ohoopee3.jpg" rel="jack" title="On the Ohoopee as an adult">Grouped Photo 3</a></p>
|
|
|
|
<h2>elastic transition + changed default photo numbering</h2>
|
|
<p><a href="../content/ohoopee1.jpg" rel="dogs" title="Me and my grandfather on the Ohoopee.">Grouped Photo 1</a></p>
|
|
<p><a href="../content/ohoopee2.jpg" rel="dogs" title="On the Ohoopee as a child">Grouped Photo 2</a></p>
|
|
<p><a href="../content/ohoopee3.jpg" rel="dogs" title="On the Ohoopee as an adult">Grouped Photo 3</a></p>
|
|
|
|
<h2>no transition + fixed width and height (75% of screen size)</h2>
|
|
<p><a href="../content/ohoopee1.jpg" rel="river" class='ohoopee' title="Me and my grandfather on the Ohoopee.">Grouped Photo 1</a></p>
|
|
<p><a href="../content/ohoopee2.jpg" rel="river" class='ohoopee' title="On the Ohoopee as a child">Grouped Photo 2</a></p>
|
|
<p><a href="../content/ohoopee3.jpg" rel="river" class='ohoopee' title="On the Ohoopee as an adult">Grouped Photo 3</a></p>
|
|
|
|
<h2>slideshow</h2>
|
|
<p><a href="../content/ohoopee1.jpg" rel="ohoopee" class='slideshow' title="Me and my grandfather on the Ohoopee.">Grouped Photo 1</a></p>
|
|
<p><a href="../content/ohoopee2.jpg" rel="ohoopee" class='slideshow' title="On the Ohoopee as a child">Grouped Photo 2</a></p>
|
|
<p><a href="../content/ohoopee3.jpg" rel="ohoopee" class='slideshow' title="On the Ohoopee as an adult">Grouped Photo 3</a></p>
|
|
|
|
<h2>Single photo with callback example</h2>
|
|
<p><a class='single' href="../content/marylou.jpg" title="Marylou on Cumberland Island">Single Photo</a></p>
|
|
|
|
<h2>Other Content Types</h2>
|
|
<p><a href="http://google.com">Outside webpage (IFrame)</a></p>
|
|
<p><a title="Homer Defined" href="../content/ajax.html">Outside HTML (Ajax)</a></p>
|
|
<p><a id="inline" href="#">Inline HTML</a></p>
|
|
<p><a class="flash" href="http://www.vimeo.com/2285902" title="Royksopp: Remind Me">Flash / Video</a></p>
|
|
|
|
<!-- This contains the hidden content for inline calls -->
|
|
<div class='hidden'>
|
|
<div id='inline_example1' style='padding:10px; background:#fff;'>
|
|
<p><strong>This content comes from a hidden element on this page.</strong></p>
|
|
<p>The inline option preserves bound JavaScript events and changes, and it puts the content back where it came from when it is closed.<br />
|
|
<a id="click" href="#" style='padding:5px; background:#ccc;'>Click me, it will be preserved!</a></p>
|
|
|
|
<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>
|
|
<p>Updating Content Example:<br />
|
|
<a class="flash" href="#">Click here to load new content</a></p>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |