Run JavaScript after Infinite Article is loaded

After the next article is loaded, we have a custom JavaScript event that runs which allows you to run your own JavaScript code:

The javascript event being used is “thb_after_infinite_load“.

The example code below alerts a text when a post is loaded.

<script>
    jQuery(document.body).on('thb_after_infinite_load', function() {
            alert('Post Loaded');
    });
</script>

Was this article helpful?

Related Articles