• Resolved ayushzeta

    (@ayushzeta)


    Great plugin !

    I am using it to run jQuery and JavaScripts which apply style on posts on archive and single templates including initiating slick slider on images inside posts.

    The problem I recently faced is with infinite scrolling.

    My homepage displays latest posts and I have infinite scrolling on my home page which loads next post automatically which wasn’t there on the starting page to begin with.

    The problem is, since this infinite scroll automatically loads next posts on scroll, it loads fresh post WITHOUT all the styles and slick slider which were supposed to be applied to these posts through the jQuery in simple custom js and CSS plugin.

    How can I resolve that so that the posts loaded by infinite scroll also have my custom jQuery applied to them ? Thank you

Viewing 1 replies (of 1 total)
  • Plugin Author Diana Burduja

    (@diana_burduja)

    Hello,

    you can wrap the style applications on posts and the slick slider initialization in a function, then call that function in the infinite scroll ajax success function, just after appending the newly loaded posts.

Viewing 1 replies (of 1 total)
  • The topic ‘How to make it work with infinite scroll ?’ is closed to new replies.