4

This my product listing page. http://45.56.70.30/pospaper/full-catalog/inkjet-cartridges.html

I have installed lof_ajaxscroll extension.when page loads first time then ajax infinite scroll working smoother.

When I click on any attribute like (Brother) then infinite scroll stops working.

This is my layered navigation js file code.

function callAjax(url)
{
    ajaxcall = true;
    $(".wk_layer_loader_bg").show();
    $.ajax({
        url     :   url,
        type    :   "GET",
        success :   function (data) {
            var body;
            var dom = document.createElement("html");
            dom.innerHTML = data;
            if ($(window).width() >=750) {
                if (($(data).find('.columns').length>0)) {
                    body = $(".columns", dom);
                    $(".columns").html(body.html());
                    $(".wk_layer_loader_bg").hide();
                } else {
                    $(".wk_layer_loader_bg").hide();
                    body = $("#maincontent", dom);
                    $("#maincontent").html(body.html());
                }
            } else {
                if (($(data).find('.columns').length>0)) {
                    body = $(".columns", dom);
                    $(".columns").html(body.html());
                    $(".wk_layer_loader_bg").hide();
                } else {
                    body = $("#maincontent", dom);
                    $("#maincontent").html(body.html());
                    $(".wk_layer_loader_bg").hide();
                }
            }
            $('[class=filter-options-content]').each(function () {
                $(this).css('display','none');
            });
            $(".attr_filter_input").trigger('keyup');
            window.history.pushState("object", "current title", url);
            location.reload();
        }
    })
}

Currently I am using location.reload() function.

This is my ajax infinite scroll file path. http://45.56.70.30/pospaper/pub/static/frontend/Pospaper/theme/en_US/Lof_AjaxScroll/js/script.js

So which function I need to use for ajax infinite scroll after select an attribute.

Your help would be appreciated.

closed as too broad by 7ochem, Mohit Kumar Arora, Jai, Dhiren Vasoya, Piyush Jul 6 '18 at 4:47

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Looks like you fixed this? – MackieeE Jun 29 '18 at 12:23
  • No i have temporary add the location.reload() function.Because once the page loads then infinite scroll works.But i want use infinite scroll with ajax. – Sunny Rahevar Jun 29 '18 at 12:27
  • @MackieeE did you get any idea? – Sunny Rahevar Jul 3 '18 at 5:50
  • did you solve the problem? – Kushal Dani Jul 5 '18 at 13:24
  • Did you get the solution ? – Manish Goswami Feb 28 at 6:02