Hello,
I am trying to dynamically display some SVG content. This content is stored as a string in my data source. An example string would look like the following:
<svg width="200" height="200" style="background-color:#D2B48C; margin-bottom:5px;" id="embeddedSVG">
<g id="myGroup" fill="blue" style="font-size:18px; text-anchor:middle; font-family: serif;">
<circle id="myCircle" cx="100" cy="75" r="50" stroke="firebrick" stroke-width="3" />
<text x="100" y="155">Hello World</text><text x="100" y="175">From Embedded SVG!</text>
</g></svg>
To accomodate for IE, I'm using SvgWeb. My problem is, to display svg content, I need to wrap it in a <script type="image/svg+xml"></script>
tag combo. My challenge is, the svg is being pulled back asynchronously via JQuery. And, to my knowledge, I can't dynamically write a 'script' tag from JavaScript.
My question is, how do I take the SVG content that is retrieved with JQuery and dynamically display it? Thank you SO much for your help