• I am trying to add an ad between infinite scroll instances. I have tried to put a javascript event trigger, but when I reload my site, it returns a blank page.
    Perhaps I am putting the code in wrong? This is what I’m using:

    ( function( $ ) {
        $( document.body ).on( 'post-load', function () {
            // New posts have been added to the page.
        } );
    } )( jQuery );

    Am I supposed to have this in my functions.php file or somewhere else?

    https://www.ads-software.com/plugins/jetpack/

Viewing 1 replies (of 1 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    This should work, as long as all your code is properly loaded on the page, and if you hook your ads into the Infinite scroll container. Could you post your site URL here, so I can have a look?

    If you want it to remain private, you can also contact us via this contact form:
    https://jetpack.me/contact-support/

Viewing 1 replies (of 1 total)
  • The topic ‘Triggering javascript event to ad adds to infinite scroll’ is closed to new replies.