JSFiddle - React, Tailwind, and code Playground

by Amit Joki

JavaScript

var jqueryObj=$("<table><tr><td><span class='thisone'>'the_text_to_change'</span><span class='thisone'>'other_text_to_change'</span><span class='thisone'>'another_text_to_change'</span></td></tr></table>");
jqueryObj.find('span').each(function(){
$(this).text($(this).attr("class"));
});
console.log(jqueryObj.html());