Sandra Antunes
Sandra Antunes

Reputation: 13

Animsition jQuery plugin for CSS animated page transitions vs jquery Masonry

I'm building a multi page site, and really love the page transition effect that the plugin Animsition allows. However on a page I used the jquery Masonry plugin. When I first open this page the layout is fine, but when I navigate to other pages of the site and return to the one that's using Masonry the layout is broken. Can anyone help... please

Upvotes: 0

Views: 754

Answers (1)

Macsupport
Macsupport

Reputation: 5444

You need to use imagesloaded.js which will make all images load before masonry is called. Load it in your page and then call masonry like this:

 $(function () {
 $('.grid').imagesLoaded( function() {
    $('.grid').masonry({
    itemSelector: '.grid-item',
    columnWidth: 300,
    gutter: 20  
        });
    });
 });

Also, a separate issue, "js/jquery.scrollToTop.min.js" is not loaded.

Upvotes: 1

Related Questions