I am using Raphael.js library for a specific work. I am creating circles and binding hover event that show/hide text. The problem is that only the text over last circle is shown/hidden, even i am hovering over other circles. plz chk this code
for(var i=0; i<feedData.length; i++){
var x = ((i+1)*diff);
var t = r.text(x, 120, feedData[i].title).hide();
var c = r.circle(x,150,10);
c.attr({fill: "red"});
c.attr({stroke: "red"});
c.attr({title: feedData[i].title});
c.hover(function (event) {
this.animate({r: 13}, 200);
t.show();
}, function (event) {
this.animate({r: 10}, 200);
t.hide();
});
}
for Raphael.js reference