Skip to content

Instantly share code, notes, and snippets.

@atavernor
Created September 23, 2017 23:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atavernor/ad618a657945125100a087b3db56d5a8 to your computer and use it in GitHub Desktop.
Save atavernor/ad618a657945125100a087b3db56d5a8 to your computer and use it in GitHub Desktop.
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