Gary
Gary

Reputation: 1

InfiniteAjaxScroll not working to load divs inside container

I was trying to use InfiniteAjaxScroll in my project to load sections in onepage. I am working in a website which is using PHP as backend. I have created one HTML page where I have added container and pagination and inside pagination I have added my ajax URLs in .next (My ajax function returns the HTML of my next item)

When I scroll my page, the loader loads and ajax request get successful but the content is not displayed in my page.

var ias = $.ias({
            container:  '#homepage_category_banner',
            item:       '.category_container',
            pagination: '#ajax-pagination',
            next:       '.next a'
        });

        ias.extension(new IASSpinnerExtension({
            src: 'images/loader-ihouzit.gif'
        }));

I have tried with load event using below code. It append the content but not work for the third item.

ias.on('load', function(event) {
            event.ajaxOptions.success = function(response) {
                $('#homepage_category_banner').append(response);
            }
        });

I have tried to check with loaded event, but it gives Loaded 0 items from server. But ajax request is successful with the item class.

Anyone who can help me to solve this issue? Please Help!!

Upvotes: 0

Views: 83

Answers (0)

Related Questions