Title: Infinite Scroll clash / Javascript Callback needed
Last modified: August 20, 2016

---

# Infinite Scroll clash / Javascript Callback needed

 *  Resolved [Kevinlikes](https://wordpress.org/support/users/kevinlikes/)
 * (@kevinlikes)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/infinite-scroll-clash-javascript-callback-needed/)
 * I’m trying to use this with the Infinite Scroll plugin on a new site I’m building.
   Once I’ve scrolled onto the second page, Collapse-O-Matic automatically expands
   and stops working. Infinite Scroll has a backend area where you can specify Javascript
   Callbacks, but I’m not sure what to include here for Collapse-O-Matic. You can
   see similar callbacks for other plugins outlined at [http://www.infinite-scroll.com/lightbox-compatibility-code/comment-page-1/](http://www.infinite-scroll.com/lightbox-compatibility-code/comment-page-1/).
   Any ideas much appreciated.
 * [http://wordpress.org/extend/plugins/jquery-collapse-o-matic/](http://wordpress.org/extend/plugins/jquery-collapse-o-matic/)

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/infinite-scroll-clash-javascript-callback-needed/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/infinite-scroll-clash-javascript-callback-needed/page/2/?output_format=md)

 *  Plugin Author [Baden](https://wordpress.org/support/users/baden03/)
 * (@baden03)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/infinite-scroll-clash-javascript-callback-needed/#post-3313665)
 * Two things:
    1. do the collapse elements that where visible before the ‘infinite-
   scroll’ display more data still work… so only the newly visible expands are not
   working? 2. can you provide a link to the page you are having trouble with so
   we can get a better fell with what exactly is going on?
 * Thanks for the feedback.. we’ll get you sorted out/plugin updated… what ever 
   it takes!
 *  Thread Starter [Kevinlikes](https://wordpress.org/support/users/kevinlikes/)
 * (@kevinlikes)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/infinite-scroll-clash-javascript-callback-needed/#post-3313667)
 * Hi Baden. Thanks for the quick response and a great plugin – it worked perfectly
   on the last site i built: [http://bit.ly/NEzTqN](http://bit.ly/NEzTqN).
 * 1. Collapse works perfectly before the ‘infinite scroll’ next page kicks in.
   
   2. [http://bit.ly/X65YAz](http://bit.ly/X65YAz) – it’s early stages, so just 
   don’t look too carefully at anything.
 * Appreciate the help. Look forward to hearing from you.
 *  Plugin Author [Baden](https://wordpress.org/support/users/baden03/)
 * (@baden03)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/infinite-scroll-clash-javascript-callback-needed/#post-3313682)
 * OK, think we identified the problem: The jQuery is working for all elements that
   exist when the page loads… but NOT for elements that are part of the content 
   added dynamically via AJAX.
 * We’ll get a patch together for you to try out soon.
 *  Thread Starter [Kevinlikes](https://wordpress.org/support/users/kevinlikes/)
 * (@kevinlikes)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/infinite-scroll-clash-javascript-callback-needed/#post-3313683)
 * Thanks Baden. Sounds right. Look forward to the patch/javascript callback.
 *  [aguidis](https://wordpress.org/support/users/aguidis/)
 * (@aguidis)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/infinite-scroll-clash-javascript-callback-needed/#post-3313746)
 * I posted a similar topic yesterday : [http://bit.ly/XqqX10](http://bit.ly/XqqX10)
 * According to Baden, it’s not possible actually to execute our custom jQuery code
   for the content added dynamically via AJAX ?
 *  Thread Starter [Kevinlikes](https://wordpress.org/support/users/kevinlikes/)
 * (@kevinlikes)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/infinite-scroll-clash-javascript-callback-needed/#post-3313747)
 * Hi Aguidis.
 * Looking at your original post, doesn’t look like you’re using Baden’s Collapse-
   O-Matic plugin? I’d recommend you rather contact the author of the plugin you’re
   using.
 * Callbacks are possible: there’s a list of code for a number of plugins at [http://www.infinite-scroll.com/lightbox-compatibility-code/comment-page-1/](http://www.infinite-scroll.com/lightbox-compatibility-code/comment-page-1/).
 * I’m using Twitter, Facebook Social Share for social media and it’s working fine–
   I just had to add
 * var el = document.getElementById(‘buttoncontainerBox’);
 * //Facebook
    if (typeof FB !== “undefined”) { FB.XFBML.parse(el); }
 * //Twitter
    if (typeof twttr !== “undefined”) { twttr.widgets.load(); }
 * to the Callback section in the Infinite Scroll plugin.
 * Hope this helps.
 *  Thread Starter [Kevinlikes](https://wordpress.org/support/users/kevinlikes/)
 * (@kevinlikes)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/infinite-scroll-clash-javascript-callback-needed/#post-3313748)
 * Hi Baden. Hope you had a great new year. Any news on a timeline for the callback/
   patch? I’m supposed to be sending a draft site to client on Monday, so if this
   is going to take a while, I’ll need to remove the plugin for this site and try
   it again on the next one, or at least warn the client of the revised timeline.
   Sorry to rush you; let me know either way. Thanks.
 *  [aguidis](https://wordpress.org/support/users/aguidis/)
 * (@aguidis)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/infinite-scroll-clash-javascript-callback-needed/#post-3313749)
 * Thank you for your reply.
    I was searching some topics on Google and when I noticed
   your title :” Infinite Scroll clash / Javascript Callback needed” I directly 
   clicked. Unfortunately it didn’t work… So I apologized for the embarrassment.
 *  Thread Starter [Kevinlikes](https://wordpress.org/support/users/kevinlikes/)
 * (@kevinlikes)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/infinite-scroll-clash-javascript-callback-needed/#post-3313750)
 * No prob. Sorry it didn’t work. Hope you come right.
 *  Plugin Author [Baden](https://wordpress.org/support/users/baden03/)
 * (@baden03)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/infinite-scroll-clash-javascript-callback-needed/#post-3313756)
 * two days, we’ll have a solution. It’s the basic livequery issue.
 *  Thread Starter [Kevinlikes](https://wordpress.org/support/users/kevinlikes/)
 * (@kevinlikes)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/infinite-scroll-clash-javascript-callback-needed/#post-3313757)
 * Thanks Baden. Apologies again for rushing you.
 *  Plugin Author [Baden](https://wordpress.org/support/users/baden03/)
 * (@baden03)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/infinite-scroll-clash-javascript-callback-needed/#post-3313771)
 * Ok, here we go!
    Please download version 1.5e (or newer) from: [http://plugins.twinpictures.de/plugins/collapse-o-matic/](http://plugins.twinpictures.de/plugins/collapse-o-matic/)
 * Replace this version with the currently installed version on your site and the
   dynamically added collapse elements should now work. Please get back to us with
   your results, as we would like to ensure the latest changes are stable and release
   version 1.5 to the WordPress Repo on Tuesday (Tomorrow)
 * Please let us know if it works!
 *  Thread Starter [Kevinlikes](https://wordpress.org/support/users/kevinlikes/)
 * (@kevinlikes)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/infinite-scroll-clash-javascript-callback-needed/#post-3313780)
 * Hi Baden. Sorry for the delayed response – juggling too many deadlines at the
   moment. I tested this out on Chrome and Firefox and unfortunately nothing changes:
   it loads perfectly before the Infinite Scroll kicks in and then doesn’t work 
   after. Since it’s not a bug – it’s just the way Infinite Scroll treats plugins–
   you might find it easier to just write the callback and add to Infinite Scroll’s
   list of compatibility codes? [http://www.infinite-scroll.com/lightbox-compatibility-code/comment-page-1/](http://www.infinite-scroll.com/lightbox-compatibility-code/comment-page-1/).
   I’ve reverted back to excerpts for now, but let me know if you need to see this
   on the site, in which case I can re-add it for you.
 *  Plugin Author [Baden](https://wordpress.org/support/users/baden03/)
 * (@baden03)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/infinite-scroll-clash-javascript-callback-needed/#post-3313782)
 * Download and install the freshly released version 1.5
    the available collapse-
   o-matic callbacks for use with the Infinite Scroll plugin are: `collapse_init();`—
   triggers initial collapse state. `findme();` — triggers fine-me feature if used.
 * This has been [tested](http://spacedonkey.de/) and proven to work.
    Issue marked
   as resolved.
 *  Thread Starter [Kevinlikes](https://wordpress.org/support/users/kevinlikes/)
 * (@kevinlikes)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/infinite-scroll-clash-javascript-callback-needed/#post-3313783)
 * Thanks Baden. Appreciate the help.

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/infinite-scroll-clash-javascript-callback-needed/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/infinite-scroll-clash-javascript-callback-needed/page/2/?output_format=md)

The topic ‘Infinite Scroll clash / Javascript Callback needed’ is closed to new 
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/jquery-collapse-o-matic_fffeff.svg)
 * [Collapse-O-Matic](https://wordpress.org/plugins/jquery-collapse-o-matic/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jquery-collapse-o-matic/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jquery-collapse-o-matic/)
 * [Active Topics](https://wordpress.org/support/plugin/jquery-collapse-o-matic/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jquery-collapse-o-matic/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jquery-collapse-o-matic/reviews/)

## Tags

 * [ajax](https://wordpress.org/support/topic-tag/ajax/)
 * [callback](https://wordpress.org/support/topic-tag/callback/)
 * [collapse-o-matic](https://wordpress.org/support/topic-tag/collapse-o-matic/)
 * [jquery](https://wordpress.org/support/topic-tag/jquery/)

 * 16 replies
 * 3 participants
 * Last reply from: [Baden](https://wordpress.org/support/users/baden03/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/infinite-scroll-clash-javascript-callback-needed/page/2/#post-3313784)
 * Status: resolved