JSFiddle - React, Tailwind, and code Playground
HTML
<div id="1">
<span class="class1"></span>
<span class="class5"></span>
</div>
JavaScript
var something = 1;
$("#" + something).children(".class5").html(function() {
var id = +$(this).closest('div').attr('id');
$(this).html('Typeof id: ' + typeof id + id);
});