Hide Static Element if Webflow CMS Collection is Empty [Snippet] <> No-Code Supply Co.

Hide Static Element if Webflow CMS Collection is Empty

Hide Static Element if Webflow CMS Collection is Empty
// Option 1 - Check if Empty element is present/visible
$(function() {
if($('#LIST-WRAPPER').find('div.w-dyn-empty').length !== 0){
$('#SECTION').hide();
}
});
// Option 2 - Check if collection list element is conditionally hidden due to being empty
$(function() {
if($("#LIST-WRAPPER").hasClass("w-condition-invisible")){
$("#SECTION").hide();
}
});

Hide a static element when a specific Webflow collection list is empty. This is useful to do things like hide an entire section on a page if the collection list within it happens to be empty.

Have feedback or a question related to this item? Drop us some feedback!

Curated: 
1.19.20

Similar items

tinyPod

7.31.24

Ultimate Notion Icons

$49
7.31.24

Faith of a Mustard Seed

7.30.24

Runway AI: Ambient Intelligence

7.30.24

Retronova

7.30.24

Renewed Vision

7.30.24

Public Work

7.30.24

Lobato

7.27.24

OVERLAY

7.25.24

Stewart & Partners

7.25.24

Jamm

7.25.24

Botanic Expo

7.25.24

SUPER GIANT

7.25.24

Defijn

7.25.24

Isle of Skye Whisky

7.25.24

Chrono

7.23.24

mmm

7.23.24

Jordan Gilroy

7.23.24

Templace

7.22.24

Brandfetch

7.22.24

The Magic of Clip Path

7.22.24

Codex

7.22.24

Rize

7.22.24

Le Flair Studios

7.17.24

Forms.Supply

7.16.24

Thind UI

7.15.24
Load more

Bummer, no results

Try a different search/filter combo, or drop us some feedback if there is something missing you would love to see!

Reset filters

Subscribe for updates

Get updates on the latest curated resources and be the first to hear of new features.