Tagged: 

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1292363

    Hi there,
    on one of my pages I would like to put several masonry gallery elements (4-6) to show the products within one category. The first and second masonry galleries load just fine, but as I scroll down, the third masonry gallery remains empty and doesn’t load their products/images until I scroll at the very end of the page and up again. The forth and fifth masonry sometimes don’t load at all and never before scrolling several times to the bottom of the page and up again.
    I already checked the forum for solutions but neither seems to be working. Yes, lazyload is turned of in both, the Enfold performance settings and the Autoptimize settings as well.
    Please help
    Thanks a lot in advance..
    Kind regards, Chris

    #1292534

    Hi chrizz06,

    Can you try to disable Javascript file merging and compression in Enfold > Performance?
    Also try to clear the browser cache.

    Best regards,
    Nikko

    #1292587

    Hi Nikko,
    Thanks for your fast reply.
    I turned off the js file merging in Enfold > Performance and it had no effect.. afterwards turned off all of the Performance settings, also without effect. Then I deactivated Autoptimize and Cache Enabler but the problem persists.
    Best regards, Chris

    #1292662

    Hi chrizz06,

    Can you give us a screenshot of how it looks on your end?
    I could see it working properly on my end and I don’t see any js errors as well.

    Best regards,
    Nikko

    #1292816

    Of course (see below)
    When I first load the page and beginn scrolling down from the top of the page, the first two masonry load correctly, but the following masonry galleries (3 4 5) don’t load until I scroll to the very bottom of the page and scroll up again. Something additional I took note right now: if I reload the page as one of these not loaded galleries (whitespace) potentially are in the viewfield, all of them almost load properly on reload the page. But I just cant tell my customers to just scroll down and up again or reload the page if products dont show up :-)
    Kind regards, Chris

    #1293178

    Hi,

    Thank you for the inquiry.

    This might be an issue with the waypoint script, used by the theme to trigger animations on scroll. You may need to adjust the offset value of that function to trigger the animation earlier than usual. You could also move the masonry gallery higher up the page, or insert additional content below the gallery.

    If you want to modify the script or function, please edit the enfold\js\shortcodes.js, look for the activate_waypoints script around line 217.

    	function activate_waypoints(container)
    	{
    		//activates simple css animations of the content once the user scrolls to an elements
    		if($.fn.avia_waypoints)
    		{
    			if(typeof container == 'undefined'){ container = 'body';};
    
    			$('.avia_animate_when_visible', container).avia_waypoints();
    			$('.avia_animate_when_almost_visible', container).avia_waypoints({ offset: '80%'});
    
    			if(container == 'body') container = '.avia_desktop body';
    			$('.av-animated-generic', container).avia_waypoints({ offset: '95%'});
    		}
    	}
    

    We have to decrease the offset value to 50% or lower to trigger the animation once the elements are in view.

    Best regards,
    Ismael

    #1297719

    Thanks a lot for the reply

    The last couple of days I tested all kind of value-combinations, but still the following masonry elements don’t load properly…

    So I was thinking about a potential workaround to use just two instead of one masonry for each shop-category. Therefore I put a first masonry element at the beginning of the shop frontpage, with each of its pictures linking to a different masonry sorting category via ?psort=categoryslug ( https://kriesi.at/support/topic/direct-link-to-masonry-category/ ) within the second, big masonry showing all products. Like that, people can klick on a category and remain on the same page viewing the products of that category. Theoretically this should work and I already used the ?psort before, but somehow this time its just not working at all.
    Please help, much appreciated

    Thanks a lot in advance

    #1298165

    Hi,

    Thank you for the update.

    The script is not working because this line is no longer valid.

    $(window).load(function() {
    

    The .load function is now deprecated, so you have to replace it with.

    $(window).on("load", function() {
      // do things here
    });
    

    — or —

    $(document).ready(function() {
      // do things here
    });
    

    Best regards,
    Ismael

    #1299122

    Thanks a lot for all your help Ismael.
    Unfortunately I still can’t get it working like before, even though I replaced the line like you metioned. Following is the code in functions.php

    add_action('wp_footer', 'ava_auto_click');
    function ava_auto_click() {
    	if(!$_GET["psort"]) return;	
    ?>
    		<script>
            (function($){	
                $(window).on("load", function() {
    <?php echo '$(".'. $_GET["psort"] .'_sort_button").trigger("click");'; ?>
                });	
            })(jQuery);
            </script>
    <?php
    }

    I guess and hope we are almost there..
    Kind regards, Chris

    #1299615

    Hi,

    Thank you for the update.

    Did you remove the script? We cannot find it in the page anymore. Please post the login details in the private field so that we could check and test the script properly.

    Best regards,
    Ismael

    #1299980
    This reply has been marked as private.
    #1300277

    Hi,

    Thank you for following up.

    We adjusted the code a bit, increase the priority value of the hook so that the script is rendered last. This fixed the issue. (see private field)

    Best regards,
    Ismael

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