Interesting behavior here, I actually kind of like the effect its having by crushing the border into this line, just it doesn’t do it for the last one!
The logic is just comparing Tags names and showing you the remaining usable Tags
Here is my site Read-Only: https://preview.webflow.com/preview/matthews-spectacular-site-9b5578?utm_medium=preview_link&utm_source=designer&utm_content=matthews-spectacular-site-9b5578&preview=4b20c0c45054bd2711983e32f3df0c90&workflow=preview
hi @MattAllum12 there is many issues in your filter but you can start with using
parentElement as a parent of
label and not a parent
div wrapper. This is why display
none is set only to
label. So the code should be like
...closes('w-dyn-item').... Hope this will point you right direction.
hi @MattAllum12 if you do not have further questions about this topic feel free to close the request as solved.
BTW: you do not need
.parentElement.closest() you can use just
.closest() you can refer to MDN docs I have posted where is on top as first sentense how it works.
traverses the element and its parents (heading toward the document root) until it finds a node that matches the specified CSS Selector
in other words, you can say it is “bubbling”. Just in case I have made the important text you should understand in bold.