Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Hide child if parent has (not) another child with class [JS]
//<div class="elementor-column"><div class="dce-acf-repater-"><div class="repeater-item"></div></div><div class="elementor-widget-button"></div></div>
(function( $ ){
$(".elementor-column .dce-acf-repater-").each(function() {
if (!$(this).has(".repeater-item").length) {
hide = $(this).closest('.elementor-column').find(".elementor-widget-button").hide();
}
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.