1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen">
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
<script type="text/javascript">
// <![CDATA[
// Automagically load Lightbox on Page Load - by Bramus! (<a href="http://www.bram.us/" target="_blank">http://www.bram.us/</a>)
// Code modded from <a href="http://www.huddletogether.com/forum/comments.php?DiscussionID=1269&page=1#Item_0" target="_blank">http://www.huddletogether.com/forum/...&page=1#Item_0</a>
function autoFireLightbox() {
//Check if location.hash matches a lightbox-anchor. If so, trigger popup of image.
setTimeout(function() {
if(document.location.hash && $(document.location.hash.substr(1)).rel.indexOf('lightbox')!=-1) {
myLightbox.start($(document.location.hash.substr(1)));
}},
250
);
}
Event.observe(window, 'load', autoFireLightbox, false);
// ]]>
</script> |
Partager