my page…http://www.philipdusel.com
i am trying to have a “full size” link which when clicked will open a lightbox window
<img src=“http://www.philipdusel.com/images/pm1.jpg” height=“75px"alt=“Title #14” />
<a rel=“lightbox-cats” class=“group1” title=”" onclick=“return false;” href=“http://philipdusel.com/images/mpl21.jpg”>
<div class=“download”>
Full Size
</div>
</a>
my problem is figuring out how to make a div which will swap its href in sync with the image.
here is the javascript
<script type=“text/javascript”>
var RotateImg =
{
init: function()
{
if (!document.getElementById) return;
RotateImg.bigImg = document.getElementById("a0");
RotateImg.prev = document.getElementById("arrowleft");
RotateImg.next = document.getElementById("arrowright");
RotateImg.pointer = 1;
RotateImg.myImage = document.getElementById("thumbnails").getElementsByTagName('img');
RotateImg.myCaption = document.getElementById("caption");
for (var i=0, ii = RotateImg.myImage.length; i < ii; i++)
{
RotateImg.myImage[i].onclick = RotateImg.clickHandler;
}
RotateImg.prev.onclick = function()
{
if (RotateImg.pointer > 1 && RotateImg.pointer < RotateImg.myImage.length+1)
{
RotateImg.pointer -= 1;
RotateImg.swapImg();
return false;
}
}
RotateImg.next.onclick = function() {
if (RotateImg.pointer > 0 && RotateImg.pointer < RotateImg.myImage.length)
{
RotateImg.pointer += 1;
RotateImg.swapImg();
return false;
}
}
},
swapImg : function()
{
var el = "img" + RotateImg.pointer;
var swap = document.getElementById(el);
RotateImg.bigImg.src = swap.src;
if (swap.getAttribute('alt'))
{
RotateImg.myCaption.innerHTML = swap.alt;
}
else
{
RotateImg.myCaption.innerHTML = "No Caption available";
}
},
clickHandler: function()
{
RotateImg.bigImg.src = this.src;
var num = this.id;
num = (num.substring(3));
RotateImg.pointer = parseInt(num,10);
RotateImg.swapImg();
return false;
}
};
RotateImg.init();
</script>
here is my brilliant 2 cents… swapDiv.myDownload but this ofcourse doesnt work
any kind souls willing to show me how to add this extra “full size” div
the following is a page with the “full size” link behavior im talking about. http://www.philipdusel.com/v2.html this is just to illustrate the “full size” div behavior. the two pages are using different scripts.