I'm using d3 to render circles that represent each of the elements in my database. Each circle ends up looking something like this:
<circle r="8" fill="#585858" stroke="#008db7" stroke-width="3" id="Node;R6AnePqKecNNe7dkr" class="R6AnePqKecNNe7dkr"></circle>
I can use the following to return "success" when any of the circles are clicked:
Template.tree.events({
'click circle': function(){
console.log("success")
}
});
but instead of "success" I'd like to return the class of the circle that was clicked.
If I console.log(this) I get 'Object {}' so my instinct tells me to use this.class but that doesn't return anything.