JSFiddle - React, Tailwind, and code Playground

by RaphaelDDL

HTML

<a href="" class="test">click me</a>

<hr>
<div id="rt-main" class="mb12">
    <div class="rt-grid-12">
        <div class="rt-block component-block main-overlay-light">
            <div id="rt-mainbody">
                <div class="component-content">
                    <div class="blog-featured"></div>
                </div>
            </div>
        </div>
    </div>
</div>

CSS

.mb12 {
    background:red;
    width: 100px;
    height: 100px;
}

JavaScript

$('a.test').click(function (e) {
    e.preventDefault();
    str = $('div.blog-featured').text();
    if ($.trim(str) === "") {
        alert('is empty')
        $('div.mb12').hide();
    }
});