Closed la40 closed 7 years ago
Hello @lachezargrigorov ,
Thanks for your contribution. However, it works fine with jQuery 3.1.1. I read in your stackoverflow thread that it's ok since jquery 2.2 and 1.12 :
The jQuery 2.2 and 1.12 Released post includes the following quote:
While jQuery is a HTML library, we agreed that class support for SVG elements could be useful. Users will now be able to call the .addClass(), .removeClass(), .toggleClass(), and .hasClass() methods on SVG. jQuery now changes the class attribute rather than the className property. This also makes the class methods usable in general XML documents. Keep in mind that many other things will not work with SVG, and we still recommend using a library dedicated to SVG if you need anything beyond class manipulation.
I think you should upgrade the jQuery version of your project instead if it's possible.
As you wish.
The new cssClass option doesn't work. JQuery can't add a class to an SVG element so use attr. Read more here: https://stackoverflow.com/questions/8638621/jquery-svg-why-cant-i-addclass?answertab=votes#tab-top