Isotope sort after append
I tried this:
$("#add").click(function(){ var $newIems = $("<div class='post-body post item'>itemName</div>") $(".items").isotope("append", $newIems, true); }); $("#sort").click(function(){ $('.items').isotope({ getSortData : { content: function ( $elem ) { return $elem.find('.post-content').text(); } } }); $('.items').isotope({ sortBy : 'date' }); $('.items').isotope( 'reLayout' ) });
But the items wont get sorted. is it possible in general to add new items to the isotope container and sort them after? What I want to do is just to append the new items on the top of my straightDown isotope list.
Notice!: the item is already appending but on the buttom!