JSFiddle - React, Tailwind, and code Playground
HTML
<span id="test">what amount of wood would a wouldchuck chuck if a wouldchuck could chuck wood?</span>
JavaScript
$(function(){
var addevent = function(what){
return function(e){
alert('Thanks to javascripts closures you have access to the event:\n' + e.target.id + '\n\nand what:\n' + what);
};
};
$('#test').click(addevent('shot'));
});