Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't work with multiples gallery #10

Open
jessydan opened this issue May 30, 2018 · 1 comment
Open

Doesn't work with multiples gallery #10

jessydan opened this issue May 30, 2018 · 1 comment

Comments

@jessydan
Copy link

jessydan commented May 30, 2018

Hi,

When i try to make multiples gallery like this :



And i instanciate the gallery like this :
` $(window).load(function () {

        $(".test").each(function() {
            $( this ).BalancedGallery({
                autoResize: true,                   // re-partition and resize the images when the window size changes
                background: null,                   // the css properties of the gallery's containing element
                idealHeight: 150,                   // ideal row height, only used for horizontal galleries, defaults to half the containing element's height
                idealWidth: null,                   // ideal column width, only used for vertical galleries, defaults to 1/4 of the containing element's width
                maintainOrder: true,                // keeps images in their original order, setting to 'false' can create a slightly better balance between rows
                orientation: 'horizontal',          // 'horizontal' galleries are made of rows and scroll vertically; 'vertical' galleries are made of columns and scroll horizontally
                padding: 10,                         // pixels between images
                shuffleUnorderedPartitions: true,   // unordered galleries tend to clump larger images at the begining, this solves that issue at a slight performance cost
                viewportHeight: null,               // the assumed height of the gallery, defaults to the containing element's height
                viewportWidth: null                 // the assumed width of the gallery, defaults to the containing element's width
            });
        });

    });`

The grid looks good but when i resize the first one do nothing and the second one is resized.

@tkosse
Copy link

tkosse commented Jul 4, 2018

You can have a look at my fork. I've put a lot of work into it, fixing things and extending functionality. Also multiple instances on the same page are possible. I work on it from time to time. Maybe you want to try my version and I would be pleased to help you :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants