Skip to content

Commit

Permalink
Update demo - open manually
Browse files Browse the repository at this point in the history
  • Loading branch information
fancyapps committed Feb 20, 2012
1 parent 3dfc606 commit 515c0f1
Showing 1 changed file with 56 additions and 12 deletions.
68 changes: 56 additions & 12 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<script type="text/javascript">
$(document).ready(function() {
/*
Simple image gallery. Use default settings
Simple image gallery. Uses default settings
*/

$('.fancybox').fancybox();
Expand Down Expand Up @@ -139,6 +139,45 @@
}
});


/*
Open manually
*/

$("#fancybox-manual-a").click(function() {
$.fancybox.open('1_b.jpg');
});

$("#fancybox-manual-b").click(function() {
$.fancybox.open({
href : 'iframe.html',
type : 'iframe',
padding : 5
});
});

$("#fancybox-manual-c").click(function() {
$.fancybox.open([
{
href : '1_b.jpg',
title : 'My title'
}, {
href : '2_b.jpg',
title : '2nd title'
}, {
href : '3_b.jpg'
}
], {
helpers : {
thumbs : {
width: 75,
height: 50
}
}
});
});


});
</script>
<style type="text/css">
Expand Down Expand Up @@ -181,19 +220,21 @@ <h3>Various types</h3>
<ul>
<li><a class="fancybox" href="#inline1" title="Lorem ipsum dolor sit amet">Inline</a></li>
<li><a class="fancybox fancybox.ajax" href="ajax.txt">Ajax</a></li>
<li><a class="fancybox fancybox.iframe" href="http://jquery.com">Iframe</a></li>
<li><a class="fancybox fancybox.iframe" href="iframe.html">Iframe</a></li>
<li><a class="fancybox" href="http://www.adobe.com/jp/events/cs3_web_edition_tour/swfs/perform.swf">Swf</a></li>
</ul>

<div style="display: none;">
<div id="inline1" style="width:400px;">
<h3>Etiam quis mi eu elit</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam quis mi eu elit tempor facilisis id et neque. Nulla sit amet sem sapien. Vestibulum imperdiet porta ante ac ornare. Nulla et lorem eu nibh adipiscing ultricies nec at lacus. Cras laoreet ultricies sem, at blandit mi eleifend aliquam. Nunc enim ipsum, vehicula non pretium varius, cursus ac tortor. Vivamus fringilla congue laoreet. Quisque ultrices sodales orci, quis rhoncus justo auctor in. Phasellus dui eros, bibendum eu feugiat ornare, faucibus eu mi. Nunc aliquet tempus sem, id aliquam diam varius ac. Maecenas nisl nunc, molestie vitae eleifend vel, iaculis sed magna. Aenean tempus lacus vitae orci posuere porttitor eget non felis. Donec lectus elit, aliquam nec eleifend sit amet, vestibulum sed nunc.
</p>
</div>
<div id="inline1" style="width:400px;display: none;">
<h3>Etiam quis mi eu elit</h3>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam quis mi eu elit tempor facilisis id et neque. Nulla sit amet sem sapien. Vestibulum imperdiet porta ante ac ornare. Nulla et lorem eu nibh adipiscing ultricies nec at lacus. Cras laoreet ultricies sem, at blandit mi eleifend aliquam. Nunc enim ipsum, vehicula non pretium varius, cursus ac tortor. Vivamus fringilla congue laoreet. Quisque ultrices sodales orci, quis rhoncus justo auctor in. Phasellus dui eros, bibendum eu feugiat ornare, faucibus eu mi. Nunc aliquet tempus sem, id aliquam diam varius ac. Maecenas nisl nunc, molestie vitae eleifend vel, iaculis sed magna. Aenean tempus lacus vitae orci posuere porttitor eget non felis. Donec lectus elit, aliquam nec eleifend sit amet, vestibulum sed nunc.
</p>
</div>

<p>
Ajax example will not run from your local computer and requires a server to run.
</p>

<h3>Button helper</h3>
<p>
<a class="fancybox-buttons" data-fancybox-group="button" href="1_b.jpg"><img src="1_s.jpg" alt="" /></a>
Expand All @@ -216,9 +257,12 @@ <h3>Thumbnail helper</h3>
<a class="fancybox-thumbs" data-fancybox-group="thumb" href="1_b.jpg"><img src="1_s.jpg" alt="" /></a>
</p>

<p>
Ajax example will not run from your local computer and requires a server to run.
</p>
<h3>Open manually</h3>
<ul>
<li><a id="fancybox-manual-a" href="javascript:;">Open single item</a></li>
<li><a id="fancybox-manual-b" href="javascript:;">Open single item, custom options</a></li>
<li><a id="fancybox-manual-c" href="javascript:;">Open gallery</a></li>
</ul>

<p>
Photo Credit: Instagrammer @whitjohns
Expand Down

0 comments on commit 515c0f1

Please sign in to comment.