Support

Account

Home Forums Gutenberg Initilize swiper slider in editor (gutenberg) Reply To: Initilize swiper slider in editor (gutenberg)

  • I didn’t find an answer anywhere so I posting what works for me.

    Call the swiper instance inside a window.load.

    jQuery:

    var initializeBlock = function( $block ) {
        $(window).load(function(){
            $block.find('.product-slider').mySwiper();
        });
    };
    

    The same principle can be used with vanilla using window.addEventListener('load').