i have this kind of HTML:
<g>
<path d="..." />
<text class="abbr"></text>
</g>
and jQuery code:
$("text.abbr").mouseover(function () {
$(this).closest("path").prev().attr("class", "active");
});
I know, SVG has a lot of limitations.
Please, help me to select closest previous element path
(if i hover element text
) using jQuery or JavaScript to add a class to element path
.
Thanks in advance!