Having some issues developing an interactive SVG map with Prototype. Extending inline SVG elements seems to be causing problems. Take a look at my code snippet below (path data removed for brevity):
<svg id="map" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="330" height="500" viewBox="-16037,-19651 28871,44234">
<g id="state_outline">
<path id="state" fill="white" stroke-width="200" d="..." />
<path id="water" fill="#a0a0ff" d="..." />
</g>
<g id="counties">
<path class="county" id="adams" d="..." />
...
</g>
</svg>
<div id="nottamap"></div>
<script type="text/javascript">
console.log($('nottamap'));
console.log($('nottamap').identify());
console.log($('counties'));
console.log($('counties').identify());
</script>
Upon execution, the output is:
<div id="nottamap">
nottamap
<g id="counties">
$("counties").identify is not a function
The issue here is that $() does not want to extend the element within the SVG structure. Is there a specific aspect of how Prototype interacts with XML elements that I might be overlooking, or perhaps a different approach I should consider?