I have div containing svg like this i want to do something when this dive click event how can i do
Code
if (document.getElementById("isparta").onclick) {
alert('ok')
};
<g id="isparta" data-plakakodu="32" data-alankodu="246" data-iladi="Isparta">
test click
</g>