JSFiddle - React, Tailwind, and code Playground
HTML
<span class='test' id="test">test</span>
JavaScript
var t = $('.test');
var s = $('#test');
if (t.is(s)) {
console.log('yes');
}
<span class='test' id="test">test</span>
var t = $('.test');
var s = $('#test');
if (t.is(s)) {
console.log('yes');
}