I have a number of divs, each containing an image that launches a lightbox gallery. A text description is also within the div and underneath each image describing what's going on (I don't want it as part of the gallery), but it doesn't contain a link to the lightbox.
Each div (and everything in it) is needed to be the button that launches the lightbox (ie, clicking anywhere in the ".project" div launches the gallery). How do I do this?
- <div class="project">
- <div class="project-image"><a href="myPhoto.jpg" rel="lightbox[01]" class="popup"><img src="xxxxx"></a>
- <div class="caption">
- <h2>Title</h2>
- <p>Description......</p>
- </div>
- </div>
- </div>
This is as far as I've got, but don't know what to do with the "rel" value. Can anyone help?
- $('.project').click(function() {
- var theLink = $(this).find("a.popup").attr("href")
- if(theLink != null) {
- window.location= theLink;
- return false;
- } else {};
- });
Thanks.