I'm making a map of Brazil as svg, I need it when I click on a particular state it gives a show on a different div that will get information about that state.
I need to compile the id of the path with the div class and display .show
Follow the code that I'm doing and where I left off with the question.
<div id="mapa">
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="590" viewBox="0 0 432 428">
<path id="acre" data-name="Acre"
d="M 40.00,152.22
C 40.00 ..." />
</svg>
</div>
<div id=acre>
<p>teste</p>
</div>
The code in js that I have find the path that I clicked and an alert showing the name as it is below, but I want to instead give this alert it a .show in a div that will already be .hide.
$("#mapa path").click(function(){ alert('Voce clicou no estado do '+$(this).attr('data-name')); });