JSFiddle - React, Tailwind, and code Playground

by sushanth009

HTML

<div class="one">
  <div class="two">
    <div class="three">Hello</div>
  </div>
</div>

<div class="one">
  <div class="two">
     <div class="container">
        <div class="three">Check Div</div>
      </div>
  </div>
</div>

CSS

div{
    width:200px;
    height:200px;
}

JavaScript

$(".one").click(function() {
   $(this).find('.two').find('.three').css('border', '1px dashed red');
   $('.two .three',this).css('border', '1px dashed red');
   $('> .two > .three',this).css('border', '1px dashed red');
});