I'm making an interactive map by my own as a school project (I am a complete newbie in programming) with the help of https://youtu.be/5oQTvBwr1UM?t=812.
The problem here is that the pop up does not appear when I click the area. Is there something wrong with my .click(function()?
<svg version="1.1"
id="svg4862" inkscape:output_extension=">
<path id="Louisiana" mytitle="Louisiana" class="st0"/>
</svg>
<script src="jquery-3.3.1.min.js"></script>
<script>
$(document).ready(function()
{
$('#svg4862').click(function()
{
var mytitle = $(this).attr('mytitle');
alert(mytitle)
});
});
</script>
I will really appreciate your help. I have no idea why it isn't working although I did exactly the same with youtube.