JSFiddle - React, Tailwind, and code Playground

HTML

<html>
    <head>
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
    </head>
    <body>
        <div id="e2">
            <div id="e1">
                text
            </div>
        </div>
    </body>
</html>

JavaScript

alert($("#e2").find("*").andSelf().is("#e1"));