JSFiddle - React, Tailwind, and code Playground

HTML

<button id="myButton">Click Me</button>

JavaScript

document.getElementById('myButton').onclick = anotherFunction;

function anotherFunction(evt){
    evt = $.event.fix(evt || window.event);//Note need for cross-browser reference to the native event
    var $target = $(evt.target);
    alert([evt.pageX, $target.attr('id')].join("\n"));
}