How to change loadsmore parameter and ajax call by portfolio filter click

1 reply · opened Apr 23, 2016

FfotoizzetApr 23, 2016

Hi,

I asked this question at Discussion on Canvas page at Envato also.
http://themeforest.net/item/canvas-the-multipurpose-html5-template/9228123/comments?utf8=%E2%9C%93&term=fotoizzet&from_buyers_and_authors_only=0
My question is the continious of the my solved previous problem.
I solved previous problem by your solution.

My new problem is
When select an filter, i want to change loadsmore ajax call parameter.

My Code;

var $container = $('#portfolio'),
        selector = '*';

$container.isotope({transitionDuration: '0.45s'});

$('#portfolio-filters a').click(function () {
    $('#portfolio-filters li').removeClass('activeFilter');
    $(this).parent('li').addClass('activeFilter');
    selector = $(this).attr('data-filter');
    $container.isotope({filter: selector});
    $("#load-next-posts>a").attr('href', function(i,a){
        return a.replace(/filter=[^&]+/, 'filter='+selector);
    });
    return false;
});

The code working and i can see DOM changed.
filter parameter * change as movies.


    [
       loads more
    ](/api/loadsmore?page=1&filter=movies)

But ajax call still calling with * parameter.

I couldn't find the solution. Please help.

SSemicolon WebSTAFFApr 26, 2016

Hello,

This Functionality is not supported by the Infinity Scroll Plugin. Additionally, it is not recommended since this will cause further issues with the Filter Functionality as it will not show all the items when you select the "Show All" Filter.

Additionally, can you please provide us with a Live URL so that we can check out if the Code we provided you in the Comments earlier is working fine or not. Thanks for your Patience.

Meanwhile, do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard