I made a CMS collection which references another collection and in some cases it will return “No items found”.
Default webflow filtering won’t work, as there is nothing to reference.
I am thinking if I could write a JS code which would observe the state of the dom and if the child element is set to Block, it would apply the display none to the parent element.
In other words, if the DIV containing no items is being shown, it would trigger the function which would hide the parent div which in turn will hide the child div and also the div with the text I don’t want.
I know it might be confusing, but all I want to hide a collection when it has no items.
@memetican smashing! that is LOVELY! Checked upon CSS file as well and it has even more useful features built in, such as Truncate text, etc!
Many thanks!
I am handing the website to a client and have noticed that SEMrush is actually pinging unminified CSS files, in this instance it’s the referenced file you offered me.
Do I have to worry about minifying the file? I know it’s just a warning, not an erorr, but still?
HI @memetican ,
Thank you again. Sorry for a dumb question - I tried replacing extension to .min.js, but after publishing it didn’t work. Could you please advise on how to properly use that?
Many thanks!
p.s. already using this script for other client too