I'm trying to make a event listener, as detailed here. For this, I'm analyzing the this
construct. When adding a point in the given link, and adding the line
console.log(this);
in the handleMouseOver
event handler, this
yields the element (for example)
<circle cx="231 cy="333" r="6" fill="black"></circle>
I now wish to select one of these attributes in order to control the behaviour. How could I select (for example), the cx
attribute? I've tried
this.attr('cx')
without no success. Thanks for all input!