JSFiddle - React, Tailwind, and code Playground

by ermakovnikolay

HTML

<div id="f" onclick="f(this)">f
  <div id="1">1</div>
  <div id="2">2</div>
  <div id="3">3</div>
</div>

CSS

#f {
  background: red;
}

JavaScript

function f(el) {
  console.dir(event);
	alert(el.id)
}