Hi! Managed to insert a photo gallery using lightbox…however, would like to make some changes:
-
Fixed previous and next buttons, been playing around with the code, with no succesfull result.
-
I have a group of photos, and if I want to enlarge the one I click, I cannot. Whatever photo I click, always the first one of the group appears. Please, does anybody know how I can solve this?
This is the code I have in my html file:
<head>
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
<script src="js/prototype.js" type="text/javascript"></script>
<script src="js/scriptaculous.js?load=effects" type="text/javascript"></script>
<script src="js/lightbox.js" type="text/javascript"></script>
<script language="JavaScript">
function openLightbox(url,group){
var objLink = document.createElement('a');
objLink.setAttribute('href',url);
objLink.setAttribute('rel','lightbox['+group+']');
objLink.setAttribute('title','caption');
Lightbox.prototype.start(objLink);
}
</script>
</head>
<body>
<a href="images/image-1.jpg" rel="lightbox[roadtrip]" title="Tarta Nupcial" id="roadtripImage1"></a>
<a href="images/image-2.jpg" rel="lightbox[roadtrip]" title="Tarta Nupcial" id="roadtripImage2"></a>
<a href="images/image-3.jpg" rel="lightbox[roadtrip]" title="Tarta Nupcial" id="roadtripImage2"></a>
</body