NodeElement container
Closed this issue · 4 comments
electerious commented
Is it correct that the container
option only allows a selector, but no NodeElement?
I would like to create a Macy instances for multiple elements without using a id
.
document.querySelectorAll('.masonry').forEach((elem) => {
const macy = Macy({
container: elem,
trueOrder: false,
waitForImages: false,
margin: 24,
columns: 6,
breakAt: {
1200: 5,
940: 3,
520: 2,
400: 1
}
})
})
sjankowski commented
I got the same problem. Have You discovered something about that @electerious ?
Even when using class selector - only first child is working.
sjankowski commented
@electerious i found a workaround in one of closed issues:
#34 (comment)
Hope it will help You too :)
jrmd commented
Hi @sjankowski and @electerious
As this seems to be a highly requested feature, I will work to implement for the next minor version.
I'll update this issue once complete.
jrmd commented
hey @electerious @sjankowski this has now been published to npm as version 2.4