Imagine this:
<svg>
<g id="node1" class="node"></g>
<g id="node2" class="node"></g>
</svg>
How can I find the 'g' tag, I want that all tags could be clicked, and not just 'node1' or 'node2'. I've tried simular to this, but could not get it work.
$('g').click(function(){
alert("Hellooooo");
});
$('g').click()
works fine. jsfiddle.net/ZLnJw – Hiles