To keep the code clean I was attempting to put my scripting code in script.js and my SVG code in svg.svg . Additionally I was including these files in my html but the javascript does not run at all. Is there some way to achieve this or do I have to embed the javascript in the SVG code using:
<script>
<![CDATA[
...
// ]]>
</script>
My Current html code includes the javascript and svg in this manner:
<embed src="svg.svg" type="svg+xml"></embed>
and
<script type="text/javascript" xlink:href="script.js"></script>