As per this JSFiddle, I create an Isotope container which contains each of my elements, upon clicking one of the links (bottom left) I'd like to reorder the elements, pulling the matched elements to the left of my container.
I do this by removing them from the DOM and shifting them to the top of the containing div. If you check your browser's console you'll see that this happens successfully, but the following call to Isotope (to redraw) fires the callback, but doesn't seem to trigger the actual redraw. Not entirely sure why this is the case, is anyone able to explain?
Solved it:
$('#products').isotope( 'reloadItems' ).isotope( { sortBy: 'original-order' } );
or just:
$('#products').isotope( 'reloadItems' ).isotope();
Still not sure why reLayout doesn't trigger this behaviour though.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With