JSFiddle - React, Tailwind, and code Playground

by Sam Tyson

HTML

<input type="button" id="el1" value="elem 1" />
<input type="button" id="el2" value="elem 2" />

JavaScript

$("body").on("click", "#el1, #el2", function(){
alert("clicked on " + $(this).attr("id"));
});