JSFiddle - React, Tailwind, and code Playground
by nabil_kadimi
HTML
<input type="button" value="click" id="b" />
JavaScript
$("#b").click (function (e) {
window.alert($(e.target).outerHTML());
});
jQuery.fn.outerHTML = function(s) {
return s
? this.before(s).remove()
: jQuery("<p>").append(this.eq(0).clone()).html();
};