-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Isotope and the filters/sort #674
Comments
Thanks for this question. Whew, it's a big one. Can you use Infinite Scroll with Isotope's filtering and sorting? Yes. The code would look something like: // init Isotope
var $grid = $('.grid').isotope({
// Isotope options
});
// init Infinite Scroll
$grid.infiniteScroll({
// Infinite Scroll options
// do not set append
// do not set outlayer
});
// append items on load
$grid.on( 'load.infiniteScroll', function( event, response, path ) {
var $items = $( response ).find('.grid-item');
// append items after images loaded
$items.imagesLoaded( function() {
$grid.append( $items );
$grid.isotope( 'insert', $items );
});
}); Add a 👍 reaction to this issue if you would like to see this feature added to the docs with demos. Do not add +1 comments — They will be deleted. But I still feel the same: Infinite Scroll with Isotope's filtering and sorting is not a good user experience. I've discussed this elsewhere in metafizzy/isotope#724. Infinite Scroll and filtering/sorting have conflicting behaviors. Infinite Scroll adds more items in sequential order. Filtering removes items. Sorting re-arranges the order of item. This leads to several odd behaviors:
I could go on. My point is that just because even though you can use these features together, maybe you should not. Then again, metafizzy/isotope#724 has gotten a lot of 👍 so maybe I should sit back and just let this ride. |
Thank you very much for the very detailed answer, to be honest I didn't ask myself those questions because I wasn't aware of some behaviours of Infinite Scroll. I think there is a compromise between infinite scrolling and sorting/filtering posts, it would be the Ajax call to loads post according to the user chosen taxonomy. Again thanks for the prompt reply and your amazing work. |
Hi, @desandro and everything!
Thank you |
@radmedov |
@desandro
|
Thank you I was really excited when I heard there was an update available for infinite scroll. I was still wondering if there is way to 'cleanly' use the Isotope default Sorting/Filtering options with Infinite Scroll.
I'm asking that because, from the older post (back in 2013), it wasn't recommended to use Isotope filter with Infinite Scroll. So I used Ajax to filter my posts.
But since there is an update versions of Infinite Scroll, I was wondering if we could use both flawlessly.
Thank you again!
The text was updated successfully, but these errors were encountered: