JSFiddle - React, Tailwind, and code Playground
HTML
<span id="125">
<a id="125" href="http://some_link">Some link</a>
</span>
JavaScript
$(document).ready(function(){
alert('Here we are trying to get anchor by its tag and id provided by "#id"\r\n'+$('a#125').text());
alert('Here we are trying to get anchor by its tag and id provided by "[id=#id]"\r\n'+$('a[id=125]').text());
});