javascript - Find class name of SVG element -



javascript - Find class name of SVG element -

how can find class name of svg attribute?

if div have been {reference div}.classname

but, doesnt work same way svg element

is there jquery or javascript method/attribute classes of svg element?

see below have tried:

here's jsfiddle: http://jsfiddle.net/ujp76/

<body> <svg class="c1"></svg> <script> window.addeventlistener("load", function () { var classname = document.queryselector("svg").getattribute("class"); console.log(classname); }); </script> </body>

javascript jquery svg classname

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -