JSFiddle - React, Tailwind, and code Playground

HTML

<html>
    <div class="tooltip">
        Bla Bla Bla
    </div>
</html>

CSS

html{
    background:blue;
}

.tooltip{
    background:red;
    height:200px;
    width:200px;
}

JavaScript

$('html:not(.tooltip)').click(function() {

    $('.tooltip').hide();
    
});