I want to display an overlay (html div) when a user clicks on an element in an SVG diagram. To visualize the problem I\'m having, suppose that the SVG image has a horizontal row
jQuery's position() does not work well for SVG elements. There is a ticket for that.
position()
You can use the native SVG method getBBox() to get the position of a SVG element.
getBBox()
$('svg circle')[0].getBBox();