JSFiddle - React, Tailwind, and code Playground

HTML

<a href="somelink" id="test">Click</a>

JavaScript

$('#test').on('click', function() {
    alert("this.href : "+this.href+"\n\n.attr(href) : "+$(this).attr('href'));
});