JSFiddle - React, Tailwind, and code Playground

by alwayshelping

HTML

<div class="hello-world">
  <h1 class="widget__title">Hello World</h1>
  <div class="big-block">
    <a href="https://www.linkedin.com/" target="_self" class="featured-block__item cf">
      <div class="featured-block__item-inner">
        <figure class="featured-block__image img-fit" itemprop="image" itemscope="" itemtype="https://schema.org/ImageObject">
          <img class="default-opacity" src="https://i.picsum.photos/id/43/200/300.jpg?hmac=F_cVhLISpNmZ9wjirHfMJgX9rQzMYJbJE1xzfwmV36c" data-fallback-img="https://i.picsum.photos/id/43/200/300.jpg?hmac=F_cVhLISpNmZ9wjirHfMJgX9rQzMYJbJE1xzfwmV36c" alt="sdsd">
        </figure>
      </div>
    </a>
  </div>
</div>

JavaScript

jQuery(document).ready(function ($) {
if ($(".hello-world .big-block").children().length == 0 && $('.hello-world .big-block').text() == 0) {
  $('.hello-world').css("display", "none");
    console.log('Yes')
} else {
	console.log('No')
}
   

});