On my home page I am showing all products with its categories once on page load.

But i wanted to do like for after scrolling down ,after each category product list before next category I wanted to show loader. I don`t wanted to lazy loading plugin. My code is like this.Only once the loader comes.

require(['jquery', 'ajaxscroll'], function ($) {
        $(document).ready(function () {
            var ias = $.ias({
                container: '#homepage_category_banner',
                item: '.category_container',
                pagination: '#ajax-pagination',
                next: '.next a.category_link'
            ias.extension(new IASSpinnerExtension({
                src: '<?php echo $block->getViewFileUrl('Pragmatic_Homepage::images/loader-ihouzit.gif') ?>'
            ias.on('load', function (event) {
                event.ajaxOptions.success = function (response) {