jscroll
jscroll copied to clipboard
How to combine jscroll with isotope ?
is there any way to combine jscroll with isotope? If I get the loaded content then I think that will be possible.
I'll have to set up a demo with jScroll and Isotope to try it, when I have time. You are welcome to do so yourself, and if you find a good solution, please enter a pull request. Thanks!
Create isotop list call in a single function
function isotopcall(){var $grid = jQuery('.productslist').isotope();}
and create callback event for jscroll load complate as below.
jQuery('.productslist').jscroll({callback:function(){isotopcall();}});
Hello, I've just tried the callback but it doesn't work, items are added, but isotope is not reloaded, so items are overlaping
here is my code
function isotopcall() {
var grid = jQuery('.iso-grid').isotope({
itemSelector: '.iso-grid-item',
percentPosition: true,
masonry: {
columnWidth: '.grid-sizer'
}
});
grid.imagesLoaded().progress( function() {
grid.isotope('layout');
});
}
jQuery('.iso-grid').jscroll({
loadingHtml: '<div class="col-12 loading"><img src="img/ajax-loader-2.gif" alt="Loading"></div>',
padding: 0,
nextSelector: 'a.more-styles',
contentSelector: '.iso-grid-item',
autoTrigger: false,
callback: function(){isotopcall();}
});