JSFiddle - React, Tailwind, and code Playground
by minagabriel
HTML
<!DOCTYPE html>
<html>
<body>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<g transform="translate(12,100)" visibility="none" >
<circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="red"/>
</g>
<g >
<circle cx="100" cy="50" r="40" stroke="black" stroke-width="2" fill="blue"/>
</svg>
</body>
</html>
JavaScript
var x = $("svg g:first").attr('transform') ;
console.log(x) ;
if (x.indexOf("-") == -1 ){ console.log("not -ve") }else {console.log('ng')} ;