Search code examples
jqueryreloadmasonry

Masonry images are overlapping


Check this site and click on view button at the middle of the screen

When you click on view button images overlapping on each other.

then if you re-size browser it will set automatically as we want.

We have tried to reload using below on view button click

$('#menu').click(function() {
    $('.primary-content').masonry('reload'); /* not working */
    $("#cont").show();
    alert ( "abc" );
    $('#test').animate({
        height: 'toggle'        
    }, 500, function() {});
});

Solution

  • working link (issue solved link) http://www.ytank.com/tourapp/swipe/demosnew/ss02.html

    ref link https://github.com/desandro/masonry/issues/211

    need to initialize Masonry before you use Masonry methods.

    $('.hero-masonry')
      // initialize Masonry
      .masonry()