I filter and sort some elements with MixItUp on a page using jScroll (infinite scrolling).
The thing is, I'd like to refresh mixitup every time jscroll is triggered.
$('div.scroll').jscroll({
autoTrigger: true,
padding:200,
nextSelector: '.pagination li.active + li a',
contentSelector: 'div.scroll',
callback: function() {
$('ul.pagination:visible:first').hide();
// $('.mix').show();
var last = $('.scroll').last().children('.mix');
$('#Container').mixItUp('append', last);
}
});
I've tried the 'append' method but it doesn't seem to be working (in Chrome console):
Uncaught NotFoundError: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.
I've also tried to reset the filters/sort with something like that:
But I've got this error:
Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
I've also tried with getState method (to get the last filter / sort), but I've got the same error.
I don't know if it's related to jScroll or if the origin of the problem is elsewhere.
Any idea of to fix this?
I'm using MixItUp 2.1.7 by the way.
Hi,
I filter and sort some elements with MixItUp on a page using jScroll (infinite scrolling).
The thing is, I'd like to refresh mixitup every time jscroll is triggered.
I've tried the 'append' method but it doesn't seem to be working (in Chrome console):
Uncaught NotFoundError: Failed to execute 'insertBefore' on 'Node': The node before which the new node is to be inserted is not a child of this node.
I've also tried to reset the filters/sort with something like that:
But I've got this error:
Uncaught NotFoundError: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.
I've also tried with getState method (to get the last filter / sort), but I've got the same error.I don't know if it's related to jScroll or if the origin of the problem is elsewhere. Any idea of to fix this? I'm using MixItUp 2.1.7 by the way.