Reputation: 51
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!
Upvotes: 3
Views: 1646
Reputation: 873
You cannot directly bind jQuery events with SVG, but there is a library to do so.
Check it out here: jQuery SVG Integration
Upvotes: 5