JSFiddle - React, Tailwind, and code Playground

by Minko Gechev

HTML

<p>If you click on me, I will disappear.</p>
<p><span>Click me away!</span></p>
<p>Click me too!</p>

JavaScript

$("span").click(function(){
    alert($(this).offsetParent().length);
      console.log(document.getElementsByTagName('html')[0] === $(this).offsetParent()[0]);
  });