I have created a group using Snap.svg.
shape = paper.rect(225, 50, 100, 50, 10, 10);
text = paper.text(253,82, "text")
myGroup = paper.g(shape, text);
myGroup.click(toggleSelection);
When I actually click the group with my mouse the toggleSelection function is executed. I am unable to figure out how to simulate a click. I've tried myGroup.click() myGroup.events.click() etc.
There doesn't seem to be a built in method to Snap so standard JS is welcome!