WordPress.org

Ready to get started?Download WordPress

Forums

Infinite-Scroll
Javascript Callback stacking JS on previous posts (2 posts)

  1. vengist
    Member
    Posted 1 year ago #

    I'm using infinite-scroll along with other javascript methods. Everything works except for some expandable content issues.

    I have the proper JS in the callback in the options menu, and it does load after more posts are fetched but multiple instances are placed on top of the previous pages' posts and the expand does not work as it should anymore.

    Is there a way to ensure the new script in the callback only affects those posts appended?

    you can see the problem here:

    http://vengist.com/redux/collection

    Javascript in callback option field:

    $('.expand').toggler();

    http://wordpress.org/extend/plugins/infinite-scroll/

  2. benarobinson
    Member
    Posted 1 year ago #

    Did you get this figured out? I have the same problem... It's annoying because I feel like it's actually easy and I've almost figured it out and then I lose it. It seems like yours works now. I'm thinking it's some matter of applying and removing classes to designate which ones are used in a given instance... I may have a new idea. Let me know if you solved your issue.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic