JSFiddle - React, Tailwind, and code Playground

by John Doe

HTML

<div class="one two">
no
</div>

<div class="the">
the
</div>


<div>
no
</div>

<input id="change" type="button" value="change" />

CSS

.two{
  background-image : url(https://image.freepik.com/free-vector/abstract-background-with-a-watercolor-texture_1048-2144.jpg);
}


.the{
  background-image : url('');
}

JavaScript

jQuery(document).ready(function ($) {
   
   if ($('.two').css('background-image') != 'none') {
              $(this).html('yes') .addClass('PDD_Class');
            }
            
            if ($('.the').css('background-image') != 'none') {
              $(this).html('YIKES') .addClass('PDD_none');
            }
       
})