score:2

Accepted answer

As @ScottCameron notes, the only way to do this is to actually move the nodes around. In general, for a bunch of sibling elements, this is pretty easy to do:

circle.on('mouseover', function() {
    this.parentNode.appendChild(this);
});

You can see a working example here: http://jsfiddle.net/nrabinowitz/5J37Z/

score:-1

add position:absolute; to your circle to make the z-index work

score:1

SVG does not have any explicit concept of Z-index. The only way to achieve Z order within an SVG is to move nodes around so the nodes you want on top appear later in the DOM than nodes you want on bottom.

There is talk about adding this for SVG 2 but as far as I know it is still in early development: http://www.w3.org/Graphics/SVG/WG/wiki/SVG2_Requirements_Input.


Related Query

More Query from same tag