layout / masonry - delayed layout adjustment - one click behind
问题 Ok, so here is the problem https://jsfiddle.net/yq7f1a63/1/ Here is my code: $(function () { $('.content').hide(); $('a.read').click(function () { $(this).parent('.excerpt').hide(); $(this).closest('li').find('.content').slideDown('fast'); $('ul').masonry('layout'); return false; }); $('a.read-less').click(function () { $(this).parent('.content').slideUp('fast'); $(this).closest('li').find('.excerpt').show(); $('ul').masonry('layout'); return false; }); }); $('ul').masonry({ itemSelector: 'li