WordPress.org

Ready to get started?Download WordPress

Forums

Collapse-O-Matic
[resolved] Infinite Scroll clash / Javascript Callback needed (17 posts)

  1. Kevinlikes
    Member
    Posted 1 year ago #

    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/. Any ideas much appreciated.

    http://wordpress.org/extend/plugins/jquery-collapse-o-matic/

  2. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    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!

  3. Kevinlikes
    Member
    Posted 1 year ago #

    Hi Baden. Thanks for the quick response and a great plugin - it worked perfectly on the last site i built: http://bit.ly/NEzTqN.

    1. Collapse works perfectly before the 'infinite scroll' next page kicks in.
    2. 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.

  4. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  5. Kevinlikes
    Member
    Posted 1 year ago #

    Thanks Baden. Sounds right. Look forward to the patch/javascript callback.

  6. aguidis
    Member
    Posted 1 year ago #

    I posted a similar topic yesterday : 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 ?

  7. Kevinlikes
    Member
    Posted 1 year ago #

    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/.

    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.

  8. Kevinlikes
    Member
    Posted 1 year ago #

    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.

  9. aguidis
    Member
    Posted 1 year ago #

    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.

  10. Kevinlikes
    Member
    Posted 1 year ago #

    No prob. Sorry it didn't work. Hope you come right.

  11. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    two days, we'll have a solution. It's the basic livequery issue.

  12. Kevinlikes
    Member
    Posted 1 year ago #

    Thanks Baden. Apologies again for rushing you.

  13. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    Ok, here we go!
    Please download version 1.5e (or newer) from: 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!

  14. Kevinlikes
    Member
    Posted 1 year ago #

    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/. 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.

  15. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    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 and proven to work.
    Issue marked as resolved.

  16. Kevinlikes
    Member
    Posted 1 year ago #

    Thanks Baden. Appreciate the help.

  17. Baden
    Member
    Plugin Author

    Posted 1 year ago #

    Note: Version 1.5.1 removes the fineme() callback. Now fine-me triggers are automatically calculated to support responsive web design.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic