I've been teaching myself HTML, CSS and Javascript for the past 5 years. And every day I learn stuff.
Just yesterday I figured out that it is possible to attach a single on click event listener to the root of an SVG. Before yesterday I was using query selectors and iterating though all the children elements of the SVG to give them all their own event listener.
Felt pretty stupid, but now I am able to save myself 50 lines of code.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I've been teaching myself HTML, CSS and Javascript for the past 5 years. And every day I learn stuff.
Just yesterday I figured out that it is possible to attach a single on click event listener to the root of an SVG. Before yesterday I was using query selectors and iterating though all the children elements of the SVG to give them all their own event listener.
Felt pretty stupid, but now I am able to save myself 50 lines of code.