Good day to all. When designing the site, I ran into a problem with working with SVG. There is an SVG-scale of a similar structure:
<svg id="district"> <path id="black1"></path> <path id="black2"></path> <path id="white1"></path> <path id="white2"></path> </svg> The task is to ensure that when you hover on # white1 to # black1 some class is added, through which I will change the original styles of this element. This way does not work:
$('#white1').hover( function() { $('#black1').toggleClass('new'); } ); I understand that the specifics of working with svg elements in js is completely different. Please tell me how you can solve this problem?