JSFiddle - React, Tailwind, and code Playground
HTML
<a href="#post">foo</a>
JavaScript
(function($) {
$(document).on('click', 'a[href="#post"]', function(event) {
event.preventDefault();
var $this = $(this);
alert($('<div>').append($this.clone()).html());
});
})(jQuery);