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

Isotope resizising container images when applied to squarespace shop #1648

Open
CarlSchwarz opened this issue Feb 2, 2023 · 0 comments
Open

Comments

@CarlSchwarz
Copy link

I am working on a squarespace shop that is displaying equal sized images.
I have added Isotope to the shop webpage for sorting and it has resized all of the images. Is there an easy way to fix this?

This is the code I added to the page header:
`<script>
var elem;
var iso;
window.onload = function(){
elem = document.querySelector('.list-grid');
iso = new Isotope( elem, {
//options
percentPosition: true,
itemSelector: '.grid-item',
layoutMode: 'fitRows',
containerStyle: null,
resize: false,
fitRows: {
equalheight: true,
gutter: 30
},
getSortData: {
name: '.grid-title'
}
});
}

function myFunction(name) {
iso.arrange({ sortBy: name });
}
</script>`
Squarespace without isotope:
WsdvD
Squarespace with isotope:
lJlfk

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

No branches or pull requests

1 participant