I have a SVG map in my html with the tag. and I want to attach events so I can click them and trigger some events. I know I can attach click event u
If you fill
a <path>
then clicking inside it (on the fill) will trigger the event handler:
<path id="sauce" fill="#f00" … />
$('#sauce').on('click',function(){ … });
You can choose to explicitly fill the path with the color transparent
and mouse events will still be caught:
<path fill="transparent" … />