Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #411248

    Hey guys- Good afternoon!

    I’m running into what appears to be a bug in the loading of the masonry gallery. Link to page in private comments.

    When the page loads if the user scrolls down quickly it appears that the calculation on the spacing doesn’t quite fire fast enough and some images become stacked on one another.

    I’ve provided a link to screenshot in the private comments as well.

    If I refresh or scale the page it recalculates and spaces them back out correctly.

    We’ve tested the issue in Chrome and Safari. While it does it in both it seems to do so more consistently in chrome.

    Thanks in advance for your help.

    #411650

    Hi,

    Try adding this at the very end of your theme / child theme functions.php file:

    function add_custom_script(){
    ?>
    <script>
    (function($){
        $(window).load(function() {
        	$(this).trigger('resize');
        });
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script');

    Regards,
    Josue

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.