• Resolved hassie

    (@hassie)


    After appending a post to the current page with ajax the Getwid blocks don’t get initialised. Quite understandable.

    Looking at the frontend.blocks.js I thought I could do this by calling

    $( document.body ).trigger( ‘post-load’ );

    after appending the post but nothing happens.

    What is the correct way to do this?

Viewing 1 replies (of 1 total)
  • Thread Starter hassie

    (@hassie)

    I figured it out.

    I expected Getwid to load all assets on every page because I didn’t check ‘Load CSS and JS of blocks on demand’ in the settings.

    Turns out the Image Slider and Media & Text Slider need two additional .js files:

    slick.min.js and imagesloaded.min.js.

    If you enqueue those and call $( document.body ).trigger( ‘post-load’ ); these dynamically loaded content blocks get initialised.

    You may need to load some other scripts for the other blocks to work.

    Cheers!

Viewing 1 replies (of 1 total)
  • The topic ‘Initialise Getwid blocks after appending post to document’ is closed to new replies.