JSFiddle - React, Tailwind, and code Playground
by adeneo
HTML
<svg height="100" width="100">
<circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" />
Sorry, your browser does not support inline SVG.
<g class="test test2"></g>
</svg>
JavaScript
$('svg g').each(function() {
console.log( this.className );
console.log( $(this).attr('class') );
console.log( $(this).attr('class').split(/\s+/) );
})