Here is my code
<svg id="a" height="210" width="400">
<path id="b" d="M150 0 L75 200 L225 200 Z" />
</svg>
i have trigger mouse move event on b
$("#b").hover(function() {
alert($(this)[0].outerHTML);
});
this was working in chrome but not working in IE how can i solve this..
please find the JSFiddle link : http://jsfiddle.net/r8v70Lnk/
alert box will show only in chrome but not in IE..
Dont know if it is a solution for you but i usually do it like:
new XMLSerializer().serializeToString(document.querySelector('#b'))
If you want to parse the string again and insert the node in your document:
new DOMParser().parseFromString(svgString, "image/svg+xml")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With