JSFiddle - React, Tailwind, and code Playground

HTML

<a id="my%20id" href="#">hello</a>

JavaScript

alert($('[id="my%20id"]').text());