• Resolved techosmic

    (@techosmic)


    Hi. My problem is that the sharing icons are not being displayed in images within the image slideshows on mobile devices though they are visible on desktop.
    Kindly help.
    Thanks

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author ILLID

    (@mihail-barinov)

    Hi,

    Please tell me what plugin you are using to add such slider?

    Regards

    Thread Starter techosmic

    (@techosmic)

    Hi. I am as such not using any plugin. I am adding the image slideshow in a blog post using wordpress built in slider.

    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>
       window.addEventListener('load', function() {
                 jQuery(document).on( 'jp_carousel.selectSlide', '.jp-carousel-wrap', function( event, slides ) {
                        $('img').sti();
                    } );
            }, false);
        </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.

    • This reply was modified 4 years, 5 months ago by ILLID.
    Thread Starter techosmic

    (@techosmic)

    hi. Thanks. But this didn’t work.

    Plugin Author ILLID

    (@mihail-barinov)

    Ok, I have another solution for you. Please try to use this code instead

    add_action( 'wp_footer', 'sti_footer', 99999999 );
    function sti_footer() { ?>
        <script>
            window.addEventListener('load', function() {
                var timeoutID;
                jQuery('body').on('DOMSubtreeModified', '.wp-block-jetpack-slideshow, .jp-carousel-wrap', function() {
                    timeoutID = window.setTimeout( function() {
                        jQuery('img').sti();
                        window.clearTimeout(timeoutID);
                    }, 500 );
                });
            }, false);
        </script>
    <?php }
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Icons not showing in image slideshow on mobile devices’ is closed to new replies.