JSFiddle - React, Tailwind, and code Playground

HTML

<div name="foo" id="bar"></div>

JavaScript

$(document).ready(function(){
    alert($("*[name='foo']").attr('id'));
});