JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<div id="foo">
   <article>
       <div>
          <p>you found me</p>
       </div>
   </article>
<div>

JavaScript

$(document).ready(function () {
 var path = '';
 $('#foo').on('click', '*', function (e) {
     path = $(this).prop("tagName");
     $(this).parents().each(function () {
        path = $(this).prop("tagName") + ' > ' + path;
     });
     alert(path);
     e.stopPropagation();
 });

});