Been trying to target a class inside a SVG spite sheet for a couple of hours now. I can get as deep as USE. I am at a loss as how to get deeper then the first child.
It can get to work outside a loop easily, still getting my head around how to use them. Hope I have not reached my question quota
See the Pen 4267d0bed43a1688664232847971ac2c by rgfx (@rgfx) on CodePen
I would only recommend using SVG sprite sheets if you enjoy spending hours trying to figure how to access your SVG and poor performance.
And a loop was never your problem. The reason you see an animation in your second demo is because you're searching the entire document for elements with a .green-sock class.
var sock = document.querySelectorAll(".green-sock");
You see 2 animations, but there's only 1 element being animated, and it's not even visible. It's the path in y