I have a single page with several links opening different fancybox galleries.
Each gallery is "activated" by clicking on a link like the following (in this case for "galleryone"):
<a class="manualfancybox" data-gallery="galleryone" name="galleryone" id="galleryone" href="#galleryone">
<img src="imageToClickToOpenGallery.png" />
</a>
Each gallery (in this case "galleryone") is created by the following code:
<div id="galleryone">
<a href="001.jpg" rel="gal_one" class="fancybox" /></a>
<a href="002.jpg" rel="gal_one" class="fancybox" /></a>
[…]
<a href="020.jpg" rel="gal_one" class="fancybox" /></a>
</div>
When the user clicks "imageToClickToOpenGalleryOne.png" it opens "galleryone" fancybox in fullscreen (thanks again JFK. That's ok, that's exactly as it should be.
"Manual Fancybox" uses the following jquery:
/* MANUALFANCYBOX by JFK (https://stackoverflow.com/users/1055987/jfk) */
$(document).ready(function () {
$(".manualfancybox").on("click", function () {
var gallery = "#" + $(this).data("gallery");
$(gallery).find(".fancybox").eq(0).click();
return false;
});
});
QUESTION: How can I make a link, like http://www.mysite.com/#galleryone to open "galleryone" like if the user has accessed my page and clicked on "imageToClickToOpenGalleryOne.png"?
Javascript, jquery, php… .htaccess?? I myself am not being able event to think it, let alone to achieve a solution…
Maybe it's not even possible due to security reasons, but nevertheless I need a solution to share links to my galleries...