I recently started playing with the infinite scroll feature of the wordpress jetpack plugin. Everything seems to work fine, but I'm trying to integrate with Freemasonry, so I need to use the post-load event, which should fire when Jetpack loads more messages.
But I canβt catch it.
I have a very minimal setup (with a supported theme by default, the twenty-fourth) and I added this little script to footer.php to try to catch the event:
<script type='text/javascript'>
document.body.addEventListener("post-load", function() {
alert('posts loaded');
});
</script>
But I never get an alert, even if new messages are being downloaded.
Any ideas?
Thanks in advance.
source
share