Infinite scroll expanding posts
-
Hello!
I find that jetpack module “infinite scroll” is expanding posts when dynamically load them.
You recommend to add collapse_init() function where it’s needed.
I’m not sure where to do that. (I’m not a PHP programmer) Can you help me?P.S. I’m using [expand] & [/expand] tags
-
Well, this is a jetpack issue but we’ll try and guid you.
According to the JavaScript Events section under the infinite-scroll support for jetpack:Inevitably, there are situations in a theme that require some JavaScript interaction after posts are added. One such example is in a theme that uses jQuery Masonry and needs to trigger that library to position the additional posts. Recognizing this need, we trigger an event after posts are appended. To make use of this event, simply catch the post-load event when it fires on document.body:
http://jetpack.me/support/infinite-scroll/#js-events
( function( $ ) { $( document.body ).on( 'post-load', function () { // New posts have been added to the page. } ); } )( jQuery );Hmm, now that we look at it… we can easily add this as an option to the plugin.
stay tune for something to test!UPDATE:
Please download and install version 1.6.9b available direct from the Plugin Oven at:
http://plugins.twinpictures.de/plugins/collapse-o-matic/Do let us know if that works for you.
Wow! Big thanks for your fast reply and for release – it works perfectly!
Great! Glad it worked out. Issue marked as resolved. If you are happy with the plugin or it’s support, please consider leaving a review.
The topic ‘Infinite scroll expanding posts’ is closed to new replies.