JSFiddle - React, Tailwind, and code Playground
by reporter
HTML
<svg id="logo" width="50" height="50" viewBox="0 0 50 50" xmlns="http://www.w3.org/2000/svg">
<g id="part-1">
<path d="..." />
<path d="..." />
</g>
<path d="..." fill="red" />
<path d="..." fill="red" />
</svg>
JavaScript
$('#logo > #part-1 > path').each(
function() {
alert($(this).attr("fill"));
});
$('#logo > #part-1 > path').attr("fill", "white");
$('#logo > #part-1 > path').each(
function() {
alert($(this).attr("fill"));
});