Could you share working examples like:
- upload an external SVG document with its resource link (script / style)
- load an SVG document from an object tag contained in the same host document
using jQuery SVG plugin? I have problems with the source on the project page: for example.
var SVG = $("#wrapper").svg('get');
SVG.load('external.svg', { addTo:true });
declares that the SVG container is undefined.
The following works, but the resources referenced in the svg file do not load:
$("#wrapper").svg({
onLoad: function(){
var svg = $("#wrapper").svg('get');
svg.load('external.svg', {addTo:true});
},
settings: {}
}
These are external CSS stylesheets and scripts. Related images are displayed correctly:
<?xml-stylesheet href="styles/common.css" type="text/css"?>
<svg>
<script xlink:href="scripts/common.js" />
<image xlink:href="images/test.png" />
</svg>
source
share