Instantly share code, notes, and snippets.

Embed
What would you like to do?
Remove a Foundation block grid item completely when its TCMS toggle content is empty
$(function (){
$(’.com_joeworkman_stacks_foundation_blockgrid_s3_stack .block-item>div>.com_joeworkman_stacks_totalcms_toggle_stack’)
.each(function(){
var $this = $(this);
if ($this.children().length == 0){
$this.closest(‘li’).remove();
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment