Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1442302

    I have a tab section with a masonry element in each tab. The content height for the tabs is set to “auto adjust to content.” But when I click “Load More” on the masonry element, the tab height doesn’t adjust and instead the additional loaded posts are hidden. I have to click to another tab and then go back to the original tab in order to see the additional posts. Any idea how to fix this?

    #1442403

    Hey Bryan,

    Thank you for the inquiry.

    Please try to add the following script in the functions.php file. The script should resize the tab section after loading the masonry items.

    function ava_custom_script_masonry_load_more()
    {
        ?>
        <script>
            (function ($)
            {
                function g()
                {
                    $(window).on('debouncedresize', function() {
                        if ($('.av-masonry-load-more').length) {
                            $(window).trigger('resize');
                        }
                    });
                }
    
                $(document).ready(function ()
                {
                    g();
                });
            })(jQuery);
        </script>
        <?php
    }
    add_action('wp_footer', 'ava_custom_script_masonry_load_more');
    

    Best regards,
    Ismael

    #1448383

    That worked perfectly, thank you!

    #1448390

    Hi,

    Great! Glad to know that the script is working. Please feel free to open another thread if you have more questions about the theme.

    Have a nice day.

    Best regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Tab Section height problem’ is closed to new replies.