JSFiddle - React, Tailwind, and code Playground

by KomathiKarunakaran

HTML

<div id="yes">
    <div class="wrapper">
        <p>foobar</p>
    </div>
</div>

CSS

.newClassName { background-color: yellow; }

JavaScript

$("div#yes > div.wrapper > p").addClass("newClassName");
console.log($("div#yes > div.wrapper > p").html())