Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajax Load More / Infinite scroll callback #131

Open
boooooooorbs opened this issue Jul 16, 2016 · 1 comment
Open

Ajax Load More / Infinite scroll callback #131

boooooooorbs opened this issue Jul 16, 2016 · 1 comment

Comments

@boooooooorbs
Copy link

Hi!

So, I am using AJAX LOAD MORE plugin on Wordpress to generate an infinite scroll. I have this callback function:

$(document).ready(function() {
$.fn.almComplete = function(alm){
          console.log('Ads!');

      $('.adunit:not("display-block")').dfp({
    dfpID: 'xxxx',
    enableSingleRequest: false
});
  };
}); 

And this is how I call the jQuery DFP:

        $.dfp({
            dfpID: 'xxxx',
            enableSingleRequest: 'false'
        });

The first ad loads fine. The subsequent ones, does not. What am I missing here? :(

@samburgers
Copy link

If you are calling the same adslot names after ajax, try changing the url with pushstate or send a new url parameter with your second dfp call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants