Home › Forums › Support › jquery event on load more posts in infinite scroll This topic has 5 replies, 3 voices, and was last updated 5 years, 8 months ago by Tom. Viewing 6 posts - 1 through 6 (of 6 total) Author Posts August 9, 2018 at 4:36 am #643953 Joshua Vandercar I’d like to run a jquery function when more posts are loaded via infinite scroll. Is there an event to which I can bind? Thanks! August 9, 2018 at 8:35 am #644203 LeoStaff Customer Support Hi there, Infinite Scroll for posts is a built in feature: https://docs.generatepress.com/article/blog-content-layout/#archives Let me know if this helps π August 9, 2018 at 9:22 am #644253 Joshua Vandercar Yes, I have that enabled. Is there a specific javascript event that is triggered after the additional posts are loaded? I have a function that needs to target and modify those elements that are being added to the DOM. August 9, 2018 at 7:29 pm #644588 TomLead Developer Lead Developer Give this a shot: jQuery( document ).ready( function($) { var $container = $( '#main article' ).first().parent(); $container.on( 'append.infiniteScroll', function( event, response, path, items ) { // Do stuff } ); } ); Make sure to load this JS only on pages that have infinite scroll initiated. Let me know π August 9, 2018 at 8:14 pm #644602 Joshua Vandercar Yes! Thank you, Tom! That got the job the done. August 10, 2018 at 7:36 am #644864 TomLead Developer Lead Developer Awesome! You’re welcome π Author Posts Viewing 6 posts - 1 through 6 (of 6 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In