Streaming live at 10am (PST)

How to make js function apply to different elements on the same page

I added the masonry.js code to my page but I’m trying to have it affect different collections on my page.

Basically I have tabs with collections in them that are the same except for a filter. Right now when my page loads, the code only affects the elements in the list with the “video” filter.

I’ve tried giving each collection a different class, and changing the class in the js snippet, but I probably did this wrong since I’m not very experienced with js.

My read-only link

Tab issue

How to solve this on webflow? More freelancer task (I think).

Two masonry on same page works fine (With your code/idea):
https://codepen.io/ezra_siton/pen/KOLdBO

1 Like

I see the code now, looks like it would be hard to implement that exact code in webflow without making everything a big custom coded div.

That’s frustrating, I guess I’ll just have to do it all on different pages!

Thanks anyways