How can I get an attribute of a rectangle in an event function? For example, I need to get opacity value. Here is the code:

var j = R.rect(position_x - 40, position_y - 285, 80, 50);
        j.attr({'fill': '#654','stroke':'none'});
        j.rotate(20 * z, position_x, position_y);
        j.mouseover(function (event) {
            this.attr({opacity: "0.5"});
        });
Edit
Report