Viewing 2 replies - 1 through 2 (of 2 total)
  • Yes, you need to do two things:

    1. Give each link that you would like to be able to trigger on page load an ID. If you have more than one of those on one page, make sure to use unique IDs. For example, id=”iframe1″, id=”iframe2″ etc.

    2. Put the following javascript in a text widget or in your themes footer.php :

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

    Now you can link to these pages, using each time the corresponding ID after the hash to make the link fire on page load. You can see examples on https://demo.status301.net/easy-fancybox-sandbox/pdf-embeds/

    Thread Starter applewerbung

    (@applewerbung)

    Thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Open Fancybox automatticly when #iframe’ is closed to new replies.