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
Post a Comment