JSFiddle - React, Tailwind, and code Playground

by Daniel Tan

HTML

<div>
    <span><span></span></span>
</div>

CSS

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

JavaScript

$('div:not("span"):nth-last-child(1)').css('background-color', 'red');
$('span:has("span"):nth-last-child(1)').css('color', 'yellow').text('parent span');