JSFiddle - React, Tailwind, and code Playground

by isherwood

HTML

<div class="tour_head1">
    <h3>Description 1</h3>
    <div>
        <p>Words</p>
    </div>
    <div></div>
</div>

<div class="tour_head1">
    <h3>Description 2</h3>
    <div></div>
    <div></div>
</div>

<div class="tour_head1">
    <h3>Description 3</h3>
    <div>
        <p>More words.</p>
    </div>
    <div></div>
</div>

JavaScript

$('.tour_head1:has(h3)').each(function() {
    if (!$(this).find('div').not(':empty').length) {
        $(this).fadeOut(2000);
    }
});