classList.toggle not working

I’m trying to toggle a cssclass using jQuery on an SVG element each time a div element is clicked. From what I’ve read, there are issues doing this with SVG elements and this way was a solution: $(“#…