I\'m messing around with SVG and I was hoping I could create SVG files in Illustrator and access elements with Javascript.
Here\'s the SVG file Illustrator kicks ou
Is it possible to do it this way, as opposed to using something like Raphael or jQuery SVG?
Definitely.
If it is possible, what's the technique?
This annotated code snippet works:
SVG Illustrator Test
Note that a limitation of this technique is that it is restricted by the same-origin policy, so alpha.svg must be hosted on the same domain as the .html file, otherwise the inner DOM of the object will be inaccessible.
Important thing to run this HTML, you need host HTML file to web server like IIS, Tomcat