问题描述:


I'm trying to adjust a plugin isotope (http://isotope.metafizzy.co/) for the needs of my project. I need to synchronously reposition the items inside the container by increasing its height. The height is increased by the plugin jQuery-Collapse (http://webcloud.se/jQuery-Collapse/) when clicking on items inside the container. Here the fiddle:

http://jsfiddle.net/adzpx1k6/12/

As seen in the example with increasing height elements located below - little jump up at recalculation position. It is necessary to avoid it.I would be grateful for any help!

网友答案:

I change to transitionDuration , slideDown & slideUp replace this jquery

$(function() {

    var $card_container = $('.card_view_wrapper').imagesLoaded(function() {
        $card_container.isotope({
            itemSelector      : '.card_item_wrapper',
            transitionDuration: 10,
            layoutMode        : 'moduloColumns',
            moduloColumns: {
                columnWidth: 302,
                gutter: 17
            }
        });
    });

    $('.collapsible_items').collapse({
        query: 'div h3',
        open: function() {
            this.slideDown(10, function() {
                $card_container.isotope('layout');
            });
        },
        close: function() {
            this.slideUp(10, function() {
                $card_container.isotope('layout');
            });
        }
    });

});

check this url - http://jsfiddle.net/adzpx1k6/13/

相关阅读:
Top