JSFiddle - React, Tailwind, and code Playground
HTML
<div id="target"></div>
<code id="asHTML"></code>
JavaScript
function eventData(e){
return {
'sender': e.srcElement || e.target,
'event': e || window.event,
};
};
$(document).ready(function(e){
var $elm = $("<input class='test' data-type='text only'/>").attr({'type':'button','value':'Test'});
$elm.appendTo('#target');
$elm.click(function(e) { alert(eventData(e).sender.value); });
$('#asHTML').text($elm[0].toString());
//Console is the best way to display a node object;
//Open your console to see the result;
console.log($elm[0]);
});