JSFiddle - React, Tailwind, and code Playground

HTML

<p tabindex="0">Test 2
</p>
<p tabindex="0">Test 1
</p>

JavaScript

$(document).ready(function () {
        $("p").focusout(function () {
            alert($(this).text());
        });

    });