JSFiddle - React, Tailwind, and code Playground
by reporter
HTML
<div class="makeSelection" onclick="eveent(this)"><h1>Text Content 1</h1></div>
<div class="makeSelection" onclick="eveent(this)"><h1>Text Content 2</h1></div>
<div class="makeSelection" onclick="eveent(this)"><h1>Text Content 3</h1></div>
JavaScript
function eveent(clickedObject)
{
let t = clickedObject.childNodes();
alert()
});