• Hi,

    After a long search because plugin don’t rly good work i found a fast solution.

    In case, #grid height calcul was wrong so much time because he calculate the height with image and sometimes befor the first image load.

    And all portfolio item are undercover other one.

    For fox that i program a clic one the first selector that he reload display.

    Fix:

    Put
    setTimeout(function() {
    $(‘#filter a:first’).click();
    }, 500);

    befor the end of your shuffle-custom.js. You would have something like that

    jQuery(document).ready(function($) {

    /* initialize shuffle plugin */
    var $grid = $(‘#grid’);

    $grid.shuffle({
    itemSelector: ‘.item’, // the selector for the items in the grid
    speed: 500,
    });

    /* reshuffle when user clicks a filter item */
    $(‘#filter a’).click(function (e) {
    e.preventDefault();

    // set active class
    $(‘#filter a’).removeClass(‘active’);
    $(this).addClass(‘active’);

    // get group name from clicked item
    var groupName = $(this).attr(‘data-group’);

    // reshuffle grid
    $grid.shuffle(‘shuffle’, groupName );
    });

    setTimeout(function() {
    $(‘#filter a:first’).click();
    }, 500);

    });

    That’s not the best but it’s work.

    https://ww.wp.xz.cn/plugins/filterable-portfolio/

The topic ‘Wrong calcul for grid height (resolved)’ is closed to new replies.