I cannot simmulate click on svg path element. But other actions like remove() are working.
I have this and it does not work:
$("#parentelement").on("click", "someelement", function() {
$('g path[data-code="' + something + '"].jvectormap-region.jvectormap-element').trigger("click");
});
not working also with ....click();
But it works with .remove() or .trigger("remove");
Any ideas or help? Thanx!
You cannot directly bind jQuery events with SVG, but there is a library to do so.
Check it out here: jQuery SVG Integration
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With