Viewing 1 post (of 1 total)
  • Author
    Posts
  • #24219
    Bean Creative
    Participant

    Hi,

    We use Hidden Gallery with a custom gallery link class called “read-it-btn”. When we load certain pages, we want the hidden gallery to display as soon as the page loads, so we added this:

    <script>
    jQuery(document).ready(function () {
    x = document.getElementsByClassName(“read-it-btn”);
    x[0].click();
    });
    </script>

    The above code is in a specific WP page template that we only use when we want this onLoad function to happen.

    It fires the JS but instead of showing the hidden gallery, it simply displays the full size first image. We do not see any JS errors happening in JS console.

    If this is not an acceptable method to show the gallery on page load, can you let me know what is?

    Thank you
    Keith

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.