JSFiddle - React, Tailwind, and code Playground
HTML
<span class="test1">
<span class="test"></span>
<span class="test2"></span>
</span>
CSS
.test:before{
content: "My Shiny New Product";
}
JavaScript
$(function() {
//get all element class test
var test = $('.test');
//each of them, alert the content
test.each(function() {
var style = window.getComputedStyle(this, "before");
alert(style.content);
});
});