Launch Gallery from a Link or Other Image or Element

Permalink Browser Info Environment
I had a client who wanted to launch the gallery from a link or other image. I came up with this which seems to do the right thing, when placed beneath the fancybox gallery block:

<p><a href="#" id="SlideShowTrigger">[Show as slide show]</p>
<script type="text/javascript">
$(document).ready(function(){
$('#SlideShowTrigger').click(function(e){
    e.preventDefault();
    $('.sortable_fancybox_gallery_container .sortable_fancybox_gallery_image:first-child img').trigger('click');
});
});
</script>


One could also use:

div.sortable_fancybox_gallery_container {
   display:none;
}


to hide the entire gallery, and have it accessible only by trigger element, kind of a popup lightbox.

Type: Discussion
Status: New
jero
View Replies:

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.