right now I have a group of svg elements (circle, rect, path, etc.).The actual document looks something like this.
<desc>Some Text</desc>
<rect id='a0' fill='green' ...>
So when you you strip the a from the id you would get the corresponding desc element. I do this with the following code:
var WW = document.getElementsByTagName('desc')
var ZZ = evt.target.id
ZZ = ZZ.split('a')
ZZ = ZZ[1]
alert(WW[ZZ].firstChild)
But the only thing the is returned in the alert right now is:
[object Text]
Anybody have any ideas or suggestions? Any help would be great.
I’d try