Last active
October 28, 2024 02:20
-
-
Save wplit/52a0476a0dd100d2c4479dba56ad49ee to your computer and use it in GitHub Desktop.
run custom code each time new content is appended to page by infinite scroll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function($) { | |
let infiniteScollerSelector = '#-infinite-scroller-2484-245'; /* ID of infinite scroller element */ | |
/* listen for append.infiniteScroll event */ | |
$(infiniteScollerSelector + ' .oxy-dynamic-list').on( 'append.infiniteScroll', function() { | |
/* code inside here that will run when the content is appended */ | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment