-
-
Save nocodesupplyco/22c5fb0a3aaa77562e544cada231165c to your computer and use it in GitHub Desktop.
Hide Static Element if Webflow Collection is Empty
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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(); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment