Viewing 4 replies - 1 through 4 (of 4 total)
  • Sorry, you are misunderstanding the use of id="fancybox-auto". You can only use this attribute once on each page. And it will cause that image to open on each page refresh independent of whatever hash tag is appended to the page URL.

    If you want to make hash values trigger fancybox you’ll have to put some extra code in a text widget:

    <script type="text/javascript">
    window.onload = function() {
        if(window.location.hash) {
            jQuery(window.location.hash).trigger('click');
        }
    };
    </script>

    And change all those id="fancybox-auto" attributes so that each one has a unique value. But do not use a strictly numeric value. Use something like id="img270", id="img271" etc. or even unique names… and use corresponding hash values in the URL like http://www.starbasket.fr/photos-des-camps/camps-2007/la-baule-5/#img729

    Thread Starter Jeromin

    (@jerominrebatet)

    Actually,2 days ago, it works perfectly, but i had a compatibility problem with a plugin …I also use nextgen-gallery.

    Now everythings works fine except the fact I can access an image with is ID in url.

    Your theme is incompatible as it includes its own FancyBox script.

    Hi jerominrebatet

    Do you mind sharing the custom code you added to your fancybox for the link sharing and the copier code?

    Regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Auto-open Easy Fancybox’ is closed to new replies.