Gallery 2011 -- "clickpicture" event - navigate - new page
Posted: Wed Oct 12, 2011 3:23 pm
I am a novice at this. I don't know where on the page to place the code:
<div class="dg-image-gallery-image" id="product1">
<img class="dg-image-gallery-thumb" src="demo-images/thumb_1.gif">
<span class="dg-image-gallery-caption">Siberian Iris<span class="imgCopyright"><br>Image copyrights - <a href="http://www.scottpeckphoto.com">ScottPeckPhoto.com</a></span></span>
<span class="dg-image-gallery-large-image-path">demo-images/large1.jpg</span>
</div>
Nor do I know where to place the script:
<script type="text/javascript">
function pictureHandler(obj){
location.href = 'product.html?id=' + obj.id.replace(/[^0-9]/g,'')
}
var gallery = new DG.ImageGallery({
el : 'dg-image-gallery'
listeners : {
clickpicture : pictureHandler
}
});
</script>
Dreamweaver 4 chokes on the
listeners : {
clickpicture : pictureHandler,
}
line in the script.
Looking at other code you have, I have tried putting clickpicture in single quotes. That doesn't work.
I don't know how to fix this error.
Many Thanks,
Darrel