JSFiddle - React, Tailwind, and code Playground
HTML
<a href="#test">Test</a>
JavaScript
$('a').each(function ea(){
console.log(this.href, this.getAttribute('href'));
});
<a href="#test">Test</a>
$('a').each(function ea(){
console.log(this.href, this.getAttribute('href'));
});