• Resolved vinsbg

    (@vinsbg)


    Hello there,

    I have a problem where the share buttons aren’t visible on all images on the same gallery.

    Here is the screenshot where you can see that the first 5-7 are having the buttons on the top left corner but the bottom images don’t have it. They are in the same category and the same container selector.

    Screenshot

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter vinsbg

    (@vinsbg)

    I think I found the problem. It is “Lazy Load” in the gallery.

    Yes, apparently when I switch on the Lazy load of the gallery the plugin doesn’t work properly. It is showing the buttons on half of the images and doesn’t show them on mobiles with iOS.

    • This reply was modified 4 years, 4 months ago by vinsbg.
    Plugin Author ILLID

    (@mihail-barinov)

    Hello,

    Can you please tell me the name of the gallery that you are using for this images?

    Or it is some custom ones?

    Regards

    Thread Starter vinsbg

    (@vinsbg)

    Hello,

    It is a Modula plugin: https://wp-modula.com/

    Plugin Author ILLID

    (@mihail-barinov)

    Looks like I found the solution for you. Please use following code snippet

    add_action( 'wp_footer', 'sti_footer', 99999999 );
    function sti_footer() { ?>
        <script>
            (function($){
                var lazyTimeoutID;
                $(window).on('load', function() {
                    $('img').on('load', function(){
                        window.clearTimeout(lazyTimeoutID);
                        lazyTimeoutID = window.setTimeout( function() {
                            $('img').sti();
                        }, 500 );
                    });
                });
            })( jQuery );
        </script>
    <?php }

    You need to add it somewhere outside the plugins folder. For example, inside functions.php file of your theme or use some plugin for adding code snippets.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Share buttons aren’t visible on all images on same galery’ is closed to new replies.